-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
188 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Container shapes</title> | ||
<!--stylesheets--> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css"/> | ||
<style type="text/css"> | ||
body{margin-top: 200px} | ||
#map-circle { | ||
width: 300px; | ||
height: 300px; | ||
border-radius: 150px; | ||
z-index: 10 /* z-index is greater than the map panel */ | ||
} | ||
#map-hexagon { | ||
|
||
width: 346px; | ||
height: 300px; /* width * 86.6025405%;*/ | ||
-webkit-clip-path: polygon(0% 50%, 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%); | ||
-moz-clip-path: polygon(0% 50%, 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%); | ||
} | ||
|
||
</style> | ||
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="row"> | ||
<div id="map-circle" class="col-md-2"></div> | ||
<div class="col-md-1"></div> | ||
<div id="map-hexagon" class="col-md-2"></div> | ||
</div> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
|
||
var map1 = L.map('map-circle').setView([51.505, -0.09], 13); | ||
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map1); | ||
|
||
var map2 = L.map('map-hexagon').setView([51.505, -0.09], 13); | ||
// L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}@2x.png').addTo(map2); | ||
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map2); | ||
|
||
</script> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Projections: NAD83/ Oregon Lambert</title> | ||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css"/> | ||
<style type="text/css"> | ||
html, body, #map { width: 100%; height: 100%; margin: 0; background: #fff; } | ||
</style> | ||
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-ajax/2.1.0/leaflet.ajax.min.js"></script> | ||
<script type="text/javascript" src="js/proj4js-compressed.js"></script> | ||
<script type="text/javascript" src="js/proj4leaflet.js"></script> | ||
</head> | ||
<body> | ||
<div id="map"></div> | ||
<script type="text/javascript"> | ||
|
||
// crs: EPSG:2991 | ||
// http://www.spatialreference.org/ref/epsg/2991/ | ||
|
||
crs = new L.Proj.CRS('EPSG:2991', | ||
'+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs', | ||
{ | ||
resolutions: [8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1] // example zoom level resolutions | ||
} | ||
); | ||
|
||
var map = L.map('map', { | ||
crs: crs | ||
}).setView([43.83,-120.67],3); | ||
|
||
|
||
var counties = L.geoJson.ajax("assets/counties-sim.geojson", { | ||
style: { | ||
color: '#4b4b4b', | ||
weight: 0.5, | ||
opacity: 1, | ||
fillColor: '#fff996', | ||
dashArray: "0 5 0", | ||
fillOpacity: 1 | ||
}}).addTo(map); | ||
|
||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Projections: NAD83/ Oregon Lambert</title> | ||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css"/> | ||
<style type="text/css"> | ||
html, body, #map { width: 100%; height: 100%; margin: 0; background: #fff; } | ||
</style> | ||
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-ajax/2.1.0/leaflet.ajax.min.js"></script> | ||
<script src="https://d3js.org/topojson.v1.min.js"></script> | ||
<script type="text/javascript" src="js/proj4js-compressed.js"></script> | ||
<script type="text/javascript" src="js/proj4leaflet.js"></script> | ||
</head> | ||
<body> | ||
<div id="map"></div> | ||
<script type="text/javascript"> | ||
|
||
// crs: EPSG:2991 | ||
// http://www.spatialreference.org/ref/epsg/2991/ | ||
|
||
crs = new L.Proj.CRS('EPSG:2991', | ||
'+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs', | ||
{ | ||
resolutions: [8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1] // example zoom level resolutions | ||
} | ||
); | ||
|
||
var map = L.map('map', { | ||
crs: crs | ||
}).setView([43.83,-120.67],3); | ||
|
||
|
||
var counties = L.geoJson.ajax("assets/counties.topojson", { | ||
style: { | ||
color: '#4b4b4b', | ||
weight: 0.5, | ||
opacity: 1, | ||
fillColor: '#fff996', | ||
dashArray: "0 5 0", | ||
fillOpacity: 1 | ||
}}).addTo(map); | ||
|
||
</script> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.