2019-06-11 15:01:16 +02:00
|
|
|
import AbstractGeoJsonOverlay from './AbstractGeoJsonOverlay.js';
|
2019-02-07 07:56:52 +01:00
|
|
|
|
2019-06-11 15:01:16 +02:00
|
|
|
export default AbstractGeoJsonOverlay.extend({
|
2019-09-18 11:53:58 +02:00
|
|
|
initialize: function() {
|
|
|
|
AbstractGeoJsonOverlay.prototype.initialize.call(this, "protector");
|
2019-02-07 07:56:52 +01:00
|
|
|
},
|
|
|
|
|
2019-05-03 17:39:53 +02:00
|
|
|
getMaxDisplayedZoom: function(){
|
|
|
|
return 11;
|
|
|
|
},
|
|
|
|
|
2019-02-07 07:56:52 +01: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
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|