1
0
forked from MTSR/mapserver
mapserver/static/js/overlays/ProtectorOverlay.js
2019-06-14 07:46:28 +02:00

32 lines
839 B
JavaScript

import AbstractGeoJsonOverlay from './AbstractGeoJsonOverlay.js';
export default AbstractGeoJsonOverlay.extend({
initialize: function(wsChannel, layerMgr) {
AbstractGeoJsonOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "protector");
},
getMaxDisplayedZoom: function(){
return 11;
},
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.owner,
"popupContent": protector.attributes.owner
}
};
}
});