aboutsummaryrefslogtreecommitdiff
path: root/gmap_arcgis.js
diff options
context:
space:
mode:
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r--gmap_arcgis.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index a7da5a9..f28106a 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -35,20 +35,20 @@ function gmap_arcgis() {
// Get an existing GMap instance using Drupal GMap Module API
map = Drupal.gmap.getMap(id).map;
- gmapArcgisShowPolygons(Drupal.settings.gmap_arcgis.polygons);
+ gmapArcgisShowPolygons(map, Drupal.settings.gmap_arcgis.polygons);
}, 5);
}
// Show all defined polygons
-function gmapArcgisShowPolygons(polygons) {
+function gmapArcgisShowPolygons(map, polygons) {
for (j = 0; j < polygons.length; j++) {
- showPolygon(polygons[j]);
+ showPolygon(map, polygons[j]);
}
}
// Hide all defined polygons
-function gmapArcgisHidePolygons(polygons) {
+function gmapArcgisHidePolygons(map, polygons) {
for (j = 0; j < polygons.length; j++) {
polygons[j].overlay.setOpacity(0);
unblockUI();
@@ -56,7 +56,7 @@ function gmapArcgisHidePolygons(polygons) {
}
// Add polygons from a given ArcGIS MapServer Layer
-function showPolygon(polygon) {
+function showPolygon(map, polygon) {
var defaultOpacity = 0.55;
if (typeof polygon.overlay != 'undefined') {
@@ -75,7 +75,6 @@ function showPolygon(polygon) {
}
});
- blockUI();
polygon.overlay.setMap(map);
polygon.overlay.setOpacity(defaultOpacity);