aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsilvio <silvio@gota.(none)>2009-10-28 16:46:15 -0200
committersilvio <silvio@gota.(none)>2009-10-28 16:46:15 -0200
commit46cd97f12deb9786e97937a7b1f3a40a4f132264 (patch)
tree25768060e66d68b1ca5f340fbc73a624dc020921
parent58a7c67ac131ccfecda6c3999f720122a6f0daa8 (diff)
downloadgmap_arcgis-46cd97f12deb9786e97937a7b1f3a40a4f132264.tar.gz
gmap_arcgis-46cd97f12deb9786e97937a7b1f3a40a4f132264.tar.bz2
Using 'for' instead of 'for each'
-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]);
}
}