1
0
forked from MTSR/mapserver

29 lines
711 B
JavaScript
Raw Normal View History

2019-04-04 10:49:55 +02:00
/* exported PoiOverlay */
/* globals AbstractIconOverlay: true */
2019-02-07 07:56:52 +01:00
2019-02-07 20:06:09 +01:00
var PoiIcon = L.icon({
iconUrl: 'css/images/marker-icon.png',
shadowUrl: 'css/images/marker-shadow.png',
iconSize: [25, 41],
iconAnchor: [12, 41],
popupAnchor: [1, -34],
tooltipAnchor: [16, -28],
shadowSize: [41, 41]
});
2019-02-07 07:56:52 +01:00
var PoiOverlay = AbstractIconOverlay.extend({
initialize: function(wsChannel, layerMgr) {
2019-02-07 20:06:09 +01:00
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "poi", PoiIcon);
2019-02-07 07:56:52 +01:00
},
2019-03-31 18:19:41 +02:00
getMaxDisplayedZoom: function(){
return 5;
},
2019-02-07 07:56:52 +01:00
createPopup: function(poi){
return "<h4>" + poi.attributes.name + "</h4><hr>" +
"<b>Owner: </b> " + poi.attributes.owner + "<br>";
}
});