work in progress - first attempt to use new rendering code

lots of things currently broken though...
This commit is contained in:
Jon Atkins
2013-08-22 22:32:31 +01:00
parent fa11087621
commit 07c28538fd
3 changed files with 80 additions and 694 deletions

View File

@ -183,22 +183,7 @@ window.setupMap = function() {
map.attributionControl.setPrefix('');
// listen for changes and store them in cookies
map.on('moveend', window.storeMapPosition);
map.on('zoomend', function() {
window.storeMapPosition();
// remove all resonators if zoom out to < RESONATOR_DISPLAY_ZOOM_LEVEL
if(isResonatorsShow()) return;
for(var i = 1; i < portalsLayers.length; i++) {
portalsLayers[i].eachLayer(function(item) {
var itemGuid = item.options.guid;
// check if 'item' is a resonator
if(getTypeByGuid(itemGuid) != TYPE_RESONATOR) return true;
portalsLayers[i].removeLayer(item);
});
}
console.log('Remove all resonators');
});
map.on('zoomend', window.storeMapPosition);
// map update status handling & update map hooks