Skip to content

Instantly share code, notes, and snippets.

@stepankuzmin
Forked from anonymous/index.html
Created September 30, 2016 08:41
Show Gist options
  • Save stepankuzmin/0ba2de366558811cd37f2ac4bc0f1562 to your computer and use it in GitHub Desktop.
Save stepankuzmin/0ba2de366558811cd37f2ac4bc0f1562 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/xoticih
<!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>
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