1
0
forked from MTSR/mapserver
mapserver/static/js/overlays/PrivProtectorOverlay.js

29 lines
810 B
JavaScript
Raw Normal View History

2019-04-04 11:49:55 +03:00
/* exported PrivProtectorOverlay */
/* globals AbstractGeoJsonOverlay: true */
var PrivProtectorOverlay = AbstractGeoJsonOverlay.extend({
initialize: function(wsChannel, layerMgr) {
AbstractGeoJsonOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "privprotector");
},
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.priv,
"popupContent": protector.attributes.priv
}
};
}
});