aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gmap_arcgis.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index 44d859b..79a1e50 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -12,10 +12,10 @@ function gmap_arcgis() {
// Fallback setting
var fallback = 'http://mapserver.fqdn/rest/services/app/MapServer';
var polygons = [ fallback ];
- var labels = [ fallback + '/2' ];
+ var labels = [ fallback + '/1' ];
var fields = new Array();
var id = 'auto1map';
- var content;
+ var content, label;
// Get data from Drupal
if (Drupal.settings.gmap_arcgis !== undefined) {
@@ -38,7 +38,8 @@ function gmap_arcgis() {
map = Drupal.gmap.getMap(id).map;
mapExtension = new esri.arcgis.gmaps.MapExtension(map);
- for each (var label in labels) {
+ for (var i = 0; i < labels.length; i++) {
+ label = labels[i];
// Set default fallback values for labels
fields = ["id", "name"];
content = 'Placeholder';
@@ -68,8 +69,8 @@ function gmap_arcgis() {
showLabels(label[0], fields, content, icon);
}
- for each (var polygon in polygons) {
- showPolygons(polygon);
+ for (var j = 0; j < polygons.length; j++) {
+ showPolygons(polygons[j]);
}
}