Resonator on map
Change: Add "RESONATOR_DISPLAY_ZOOM_LEVEL" to control minimum zoom level resonator will display Add layerGroup "resonatorsLayers" to draw resonators on it. Add "window.resonators" to store references to resonators on map Resonator will have guid of portal with ".11" or ".12" replaced with ".r0"~".r7" Add function "window.renderResontor" to draw resonators (use sorgo's code [sorgo](https://github.com/sorgo)) "window.renderPortal" will call "window.renderResontor" before add portal to portalsLayers Change "window.removeByGuid" to handle resonators Change "window.cleanUp" to handle resonators cleanup
This commit is contained in:
@ -81,6 +81,15 @@ window.setupMap = function() {
|
||||
map.addLayer(linksLayer, true);
|
||||
addLayers['Links'] = linksLayer;
|
||||
|
||||
resonatorsLayers = [];
|
||||
for(var i = 1; i <= 8; i++) {
|
||||
resonatorsLayers[i] = L.layerGroup([]);
|
||||
map.addLayer(resonatorsLayers[i]);
|
||||
var t = 'Level ' + i + ' Portal resonators';
|
||||
addLayers[t] = resonatorsLayers[i];
|
||||
}
|
||||
|
||||
|
||||
map.addControl(new L.Control.Layers({
|
||||
'OSM Cloudmade Midnight': views[0],
|
||||
'OSM Cloudmade Minimal': views[1],
|
||||
|
Reference in New Issue
Block a user