1
0
forked from MTSR/mapserver
mapserver/public/js/map/overlays/ATMOverlay.js

39 lines
878 B
JavaScript
Raw Normal View History

2019-06-11 15:16:41 +03:00
import AbstractIconOverlay from './AbstractIconOverlay.js';
2019-05-14 10:01:52 +03:00
2019-06-11 15:16:41 +03:00
export default AbstractIconOverlay.extend({
2019-09-18 12:53:58 +03:00
initialize: function() {
AbstractIconOverlay.prototype.initialize.call(this, "atm");
2019-05-14 10:01:52 +03:00
},
getMaxDisplayedZoom: function(){
return 10;
},
getIcon: function(obj){
2019-05-14 17:04:42 +03:00
var img = "pics/atm_front.png";
2019-05-14 10:01:52 +03:00
if (obj.attributes.type == "wiretransfer")
img = "pics/atm_front.png";
else if (obj.attributes.type == "atm2")
img = "pics/atm2_front.png";
else if (obj.attributes.type == "atm3")
img = "pics/atm3_front.png";
return L.icon({
2019-05-14 10:01:52 +03:00
iconUrl: img,
iconSize: [16, 16],
iconAnchor: [8, 8],
popupAnchor: [0, -8]
});
},
createPopup: function(obj){
var title = "ATM";
if (obj.attributes.type == "wiretransfer")
title = "Wiretransfer";
return "<h4>" + title + "</h4>";
}
});