2019-04-04 11:49:55 +03:00
|
|
|
/* exported ProtectorOverlay */
|
|
|
|
/* globals AbstractGeoJsonOverlay: true */
|
2019-02-07 09:56:52 +03:00
|
|
|
|
|
|
|
var ProtectorOverlay = AbstractGeoJsonOverlay.extend({
|
|
|
|
initialize: function(wsChannel, layerMgr) {
|
|
|
|
AbstractGeoJsonOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "protector");
|
|
|
|
},
|
|
|
|
|
2019-05-03 18:39:53 +03:00
|
|
|
getMaxDisplayedZoom: function(){
|
|
|
|
return 11;
|
|
|
|
},
|
|
|
|
|
2019-02-07 09:56:52 +03:00
|
|
|
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
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|