aboutsummaryrefslogtreecommitdiff
path: root/gmap_arcgis.js
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2012-10-17 13:15:23 -0300
committerSilvio <silvio@socioambiental.org>2012-10-17 13:15:23 -0300
commit24e6236e58c30f8156657f1144149391ca51e8dc (patch)
tree95360cdaad5a87d761c82023a2cb9dfa12af34b5 /gmap_arcgis.js
parentf34456942c8daffdf2ffec52ca0abfbbcbc5ff79 (diff)
downloadgmap_arcgis-24e6236e58c30f8156657f1144149391ca51e8dc.tar.gz
gmap_arcgis-24e6236e58c30f8156657f1144149391ca51e8dc.tar.bz2
Support for multiple layers at showPolygons()
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r--gmap_arcgis.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index 31f3f07..cf662e9 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -73,12 +73,8 @@ function gmap_arcgis() {
showLabels(label[0], fields, content, icon);
}
- // TODO: that should be defined elsewhere
- //layers = [1,2,3,4,5,6,7,8];
-
for (j = 0; j < polygons.length; j++) {
- //showPolygons(polygons[j], layers);
- showPolygons(polygons[j]);
+ showPolygons(polygons[j]['base'] + polygons[j]['service'], polygons[j]['layers']);
}
}, 5);
@@ -129,7 +125,7 @@ function showLabelsCallback(fields, content, icon) {
function showPolygons(uri, layers = undefined) {
pol = new esri.arcgis.gmaps.DynamicMapServiceLayer(uri, null, 0.55);
- if (layers != undefined) {
+ if (layers != undefined || layers == []) {
pol.setVisibleLayers(layers);
}