1
0
forked from MTSR/mapserver
mapserver/public/js/map/overlays/PrivProtectorOverlay.js
1F616EMO~nya cbf58dfbf8
Put markers at the center of nodes (#374)
* Put markers at the center of nodes

* Do the fix on every objects
2024-06-06 19:23:14 +02:00

28 lines
805 B
JavaScript

import AbstractGeoJsonOverlay from './AbstractGeoJsonOverlay.js';
export default AbstractGeoJsonOverlay.extend({
initialize: function() {
AbstractGeoJsonOverlay.prototype.initialize.call(this, "privprotector");
},
createFeature: function(protector){
return {
"type":"Feature",
"geometry": {
"type":"Polygon",
"coordinates":[[
[protector.x-5 + 0.5,protector.z-5 + 0.5],
[protector.x-5 + 0.5,protector.z+6 + 0.5],
[protector.x+6 + 0.5,protector.z+6 + 0.5],
[protector.x+6 + 0.5,protector.z-5 + 0.5],
[protector.x-5 + 0.5,protector.z-5 + 0.5]
]]
},
"properties":{
"name": protector.attributes.priv,
"popupContent": protector.attributes.priv
}
};
}
});