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

26 lines
644 B
JavaScript
Raw Normal View History

2019-04-04 11:49:55 +03:00
/* exported PoiOverlay */
/* globals AbstractIconOverlay: true */
2019-02-07 09:56:52 +03:00
var PoiOverlay = AbstractIconOverlay.extend({
initialize: function(wsChannel, layerMgr) {
2019-05-02 12:14:27 +03:00
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "poi");
2019-02-07 09:56:52 +03:00
},
2019-05-02 12:09:29 +03:00
getIcon: function(obj){
return L.AwesomeMarkers.icon({
icon: obj.attributes.icon || "home",
prefix: "fa",
markerColor: obj.attributes.color || "blue"
});
},
2019-03-31 19:19:41 +03:00
getMaxDisplayedZoom: function(){
return 5;
},
2019-02-07 09:56:52 +03:00
createPopup: function(poi){
return "<h4>" + poi.attributes.name + "</h4><hr>" +
"<b>Owner: </b> " + poi.attributes.owner + "<br>";
}
});