Created
September 30, 2016 08:41
-
-
Save anonymous/b4e0fffa3ef5da397ed82ace396d367c to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/xoticih
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.js"></script> | |
<script src="http://kartena.github.io/Proj4Leaflet/lib/proj4-compressed.js"></script> | |
<script src="http://kartena.github.io/Proj4Leaflet/src/proj4leaflet.js"></script> | |
<style> #map { width: 640px; height: 480px; } </style> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script id="jsbin-javascript"> | |
var crs = new L.Proj.CRS( | |
"USER:100000", | |
"+proj=aea +lat_1=52 +lat_2=64 +lat_0=0 +lon_0=105 +x_0=18500000 +y_0=0 +ellps=krass +units=m +towgs84=28,-130,-95,0,0,0,0 +no_defs", | |
{ resolutions: [8192, 4096, 2048, 1024, 512, 256, 128] } | |
); | |
var map = L.map('map', { crs: crs, continuousWorld: true }).setView([60, 100], 0); | |
proj4.defs("urn:ogc:def:crs:OGC:1.3:CRS84", "+proj=longlat +datum=WGS84 +no_defs"); | |
fetch('http://static.urbica.co/tmp/fc.geojson').then(r => r.json()).then(fc => { | |
L.Proj.geoJson(fc).addTo(map); | |
}); | |
var bounds = L.bounds([13887591.60, 4540005.92], [22035987.47, 9022248.39]); | |
L.Proj.imageOverlay('http://static.urbica.co/tmp/map.png', bounds).addTo(map); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var crs = new L.Proj.CRS( | |
"USER:100000", | |
"+proj=aea +lat_1=52 +lat_2=64 +lat_0=0 +lon_0=105 +x_0=18500000 +y_0=0 +ellps=krass +units=m +towgs84=28,-130,-95,0,0,0,0 +no_defs", | |
{ resolutions: [8192, 4096, 2048, 1024, 512, 256, 128] } | |
); | |
var map = L.map('map', { crs: crs, continuousWorld: true }).setView([60, 100], 0); | |
proj4.defs("urn:ogc:def:crs:OGC:1.3:CRS84", "+proj=longlat +datum=WGS84 +no_defs"); | |
fetch('http://static.urbica.co/tmp/fc.geojson').then(r => r.json()).then(fc => { | |
L.Proj.geoJson(fc).addTo(map); | |
}); | |
var bounds = L.bounds([13887591.60, 4540005.92], [22035987.47, 9022248.39]); | |
L.Proj.imageOverlay('http://static.urbica.co/tmp/map.png', bounds).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
var crs = new L.Proj.CRS( | |
"USER:100000", | |
"+proj=aea +lat_1=52 +lat_2=64 +lat_0=0 +lon_0=105 +x_0=18500000 +y_0=0 +ellps=krass +units=m +towgs84=28,-130,-95,0,0,0,0 +no_defs", | |
{ resolutions: [8192, 4096, 2048, 1024, 512, 256, 128] } | |
); | |
var map = L.map('map', { crs: crs, continuousWorld: true }).setView([60, 100], 0); | |
proj4.defs("urn:ogc:def:crs:OGC:1.3:CRS84", "+proj=longlat +datum=WGS84 +no_defs"); | |
fetch('http://static.urbica.co/tmp/fc.geojson').then(r => r.json()).then(fc => { | |
L.Proj.geoJson(fc).addTo(map); | |
}); | |
var bounds = L.bounds([13887591.60, 4540005.92], [22035987.47, 9022248.39]); | |
L.Proj.imageOverlay('http://static.urbica.co/tmp/map.png', bounds).addTo(map); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment