1
0
forked from MTSR/mapserver
mapserver/server/static/js/main.js

38 lines
730 B
JavaScript
Raw Normal View History

2019-01-20 21:50:24 +03:00
(function(){
var crs = L.Util.extend({}, L.CRS.Simple, {
//transformation: L.transformation(0.001, 0, -0.001, 0),
scale: function (zoom) {
return Math.pow(2, zoom-9);
}
});
var initialZoom = 11;
var initialCenter = [0, 0];
var map = L.map('image-map', {
minZoom: 2,
maxZoom: 12,
center: initialCenter,
zoom: initialZoom,
crs: crs
});
2019-01-29 10:57:35 +03:00
WebSocketChannel.connect();
2019-01-22 22:19:04 +03:00
2019-01-20 21:50:24 +03:00
var layers = {};
2019-01-29 10:57:35 +03:00
var Layer = RealtimeTileLayer.create(0);
2019-01-20 21:50:24 +03:00
var tileLayer = new Layer();
tileLayer.addTo(map);
L.control.layers(layers, {}).addTo(map);
2019-01-29 10:57:35 +03:00
var el = CoordinatesDisplay.create({ position: 'bottomleft' });
2019-01-20 21:50:24 +03:00
el.addTo(map);
})()