aboutsummaryrefslogtreecommitdiff
path: root/gmap_arcgis.js
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2012-10-17 11:50:18 -0300
committerSilvio <silvio@socioambiental.org>2012-10-17 11:50:18 -0300
commitf34456942c8daffdf2ffec52ca0abfbbcbc5ff79 (patch)
treea40a530374cb141f410302408e50376bd919fb07 /gmap_arcgis.js
parentcfb26c5af37da595a7a81f90065fde9537dbc6b1 (diff)
downloadgmap_arcgis-f34456942c8daffdf2ffec52ca0abfbbcbc5ff79.tar.gz
gmap_arcgis-f34456942c8daffdf2ffec52ca0abfbbcbc5ff79.tar.bz2
Expanding to the whole country
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r--gmap_arcgis.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index af85eaf..31f3f07 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -73,8 +73,12 @@ 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]);
+ //showPolygons(polygons[j], layers);
+ showPolygons(polygons[j]);
}
}, 5);
@@ -122,14 +126,21 @@ function showLabelsCallback(fields, content, icon) {
}
// Add polygons from a given ArcGIS MapServer Layer
-function showPolygons(uri) {
+function showPolygons(uri, layers = undefined) {
pol = new esri.arcgis.gmaps.DynamicMapServiceLayer(uri, null, 0.55);
- GEvent.addListener(pol,"load",function(g){ map.addOverlay(g);setTimeout($.unblockUI, 6000);});
+
+ if (layers != undefined) {
+ pol.setVisibleLayers(layers);
+ }
+
+ //GEvent.addListener(pol,"load",function(g){ map.addOverlay(g);setTimeout($.unblockUI, 6000);});
+ GEvent.addListener(pol,"load", showPolygonsCallback);
}
// Callback for showPolygons
function showPolygonsCallback(mapservicelayer, error) {
map.addOverlay(mapservicelayer);
+ setTimeout($.unblockUI, 6000);
}
// Add custom marker