1
0
forked from MTSR/mapserver
mapserver/server/static/js/overlays/TravelnetOverlay.js

40 lines
814 B
JavaScript
Raw Normal View History

2019-02-01 14:58:26 +03:00
'use strict';
2019-01-29 20:08:54 +03:00
2019-02-01 14:58:26 +03:00
var TravelnetIcon = L.icon({
iconUrl: 'pics/travelnet_inv.png',
2019-01-29 20:08:54 +03:00
2019-02-01 14:58:26 +03:00
iconSize: [64, 64],
iconAnchor: [32, 32],
popupAnchor: [0, -32]
});
2019-01-29 20:08:54 +03:00
2019-02-01 14:58:26 +03:00
var TravelnetOverlay = L.LayerGroup.extend({
2019-02-01 15:20:50 +03:00
initialize: function(wsChannel, layerMgr) {
2019-02-01 15:28:26 +03:00
this.layerMgr = layerMgr;
this.wsChannel = wsChannel;
2019-01-29 23:07:29 +03:00
2019-02-01 15:28:26 +03:00
this.onLayerChange = this.onLayerChange.bind(this);
},
onLayerChange: function(layer){
//TODO
2019-02-01 14:58:26 +03:00
},
2019-01-29 23:07:29 +03:00
2019-02-01 14:58:26 +03:00
onAdd: function(map) {
2019-02-01 15:28:26 +03:00
this.layerMgr.addListener(this.onLayerChange);
2019-02-01 14:58:26 +03:00
console.log("TravelnetOverlay.onAdd", map);
2019-01-29 20:08:54 +03:00
2019-02-01 14:58:26 +03:00
api.getMapObjects(-10,-10,-10,10,10,10,"travelnet")
.then(function(list){
console.log(list);
})
},
onRemove: function(map) {
2019-02-01 15:28:26 +03:00
this.layerMgr.removeListener(this.onLayerChange);
2019-02-01 14:58:26 +03:00
console.log("TravelnetOverlay.onRemove");
}
});