mapserver/static/js/map/overlays/PoiOverlay.js

25 lines
636 B
JavaScript
Raw Normal View History

2019-06-11 15:01:16 +02:00
import AbstractIconOverlay from './AbstractIconOverlay.js';
2019-02-07 07:56:52 +01:00
2019-06-11 15:01:16 +02:00
export default AbstractIconOverlay.extend({
2019-02-07 07:56:52 +01:00
initialize: function(wsChannel, layerMgr) {
2019-05-02 11:14:27 +02:00
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "poi");
2019-02-07 07:56:52 +01:00
},
2019-05-02 11:09:29 +02:00
getIcon: function(obj){
return L.AwesomeMarkers.icon({
icon: obj.attributes.icon || "home",
prefix: "fa",
markerColor: obj.attributes.color || "blue"
});
},
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>";
}
});