Mercurial > hg > STI-GWT
diff war/scripts/sti/STIMap.js @ 75:d69066d16e45 trimmed_data
load overlays from data-file
author | Sebastian Kruse <skruse@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 15 Jan 2013 16:32:25 +0100 |
parents | eac73bf1ce6e |
children | 7b65d95735d2 |
line wrap: on
line diff
--- a/war/scripts/sti/STIMap.js Mon Jan 14 14:37:26 2013 +0100 +++ b/war/scripts/sti/STIMap.js Tue Jan 15 16:32:25 2013 +0100 @@ -1377,22 +1377,20 @@ } else { - var limesLayer = new OpenLayers.Layer.Vector("KML", { + var newLayer = new OpenLayers.Layer.Vector("KML", { projection: this.openlayersMap.displayProjection, strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ - url: "data/overlay/limes.kml", + url: this.core.overlays[index].url, format: new OpenLayers.Format.KML({ extractStyles: true, extractAttributes: true }) }) }); - this.openlayersMap.addLayer(limesLayer); + this.openlayersMap.addLayer(newLayer); - this.overlayLayers[index] = limesLayer; - - //limesLayer.setVisibility(true); + this.overlayLayers[index] = newLayer; } },