From 24e6236e58c30f8156657f1144149391ca51e8dc Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 17 Oct 2012 13:15:23 -0300 Subject: Support for multiple layers at showPolygons() --- gmap_arcgis.js | 8 ++------ 1 file 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); } -- cgit v1.2.3