show poi on less zoom
This commit is contained in:
parent
91acdec607
commit
49f56c01b0
@ -47,10 +47,14 @@ var AbstractIconOverlay = L.LayerGroup.extend({
|
||||
return this.icon;
|
||||
},
|
||||
|
||||
getMaxDisplayedZoom: function(){
|
||||
return 10;
|
||||
},
|
||||
|
||||
reDraw: function(full){
|
||||
var self = this;
|
||||
|
||||
if (this.map.getZoom() < 10) {
|
||||
if (this.map.getZoom() < this.getMaxDisplayedZoom()) {
|
||||
this.clearLayers();
|
||||
this.currentObjects = {};
|
||||
return;
|
||||
|
@ -16,6 +16,10 @@ var PoiOverlay = AbstractIconOverlay.extend({
|
||||
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "poi", PoiIcon);
|
||||
},
|
||||
|
||||
getMaxDisplayedZoom: function(){
|
||||
return 5;
|
||||
},
|
||||
|
||||
createPopup: function(poi){
|
||||
return "<h4>" + poi.attributes.name + "</h4><hr>" +
|
||||
"<b>Owner: </b> " + poi.attributes.owner + "<br>";
|
||||
|
Loading…
Reference in New Issue
Block a user