1
0
forked from MTSR/mapserver
mapserver/server/static/js/overlays/XPProtectorOverlay.js
2019-04-04 10:49:55 +02:00

29 lines
818 B
JavaScript

/* exported XPProtectorOverlay */
/* globals AbstractGeoJsonOverlay: true */
var XPProtectorOverlay = AbstractGeoJsonOverlay.extend({
initialize: function(wsChannel, layerMgr) {
AbstractGeoJsonOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "xpprotector");
},
createFeature: function(protector){
return {
"type":"Feature",
"geometry": {
"type":"Polygon",
"coordinates":[[
[protector.x-5,protector.z-5],
[protector.x-5,protector.z+6],
[protector.x+6,protector.z+6],
[protector.x+6,protector.z-5],
[protector.x-5,protector.z-5]
]]
},
"properties":{
"name": protector.attributes.xpthreshold,
"popupContent": protector.attributes.xpthreshold
}
};
}
});