Index: trunk/extensions/Maps/Services/GoogleMaps3/GoogleMap3Functions.js |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | |
19 | 19 | // TODO: types - http://code.google.com/apis/maps/documentation/v3/reference.html#MapTypeRegistry |
20 | 20 | |
21 | | - for (marker in markerData) getGMaps3Marker(map, markerData[marker]); |
| 21 | + for (var marker = 0; marker < markerData.length; marker++) getGMaps3Marker(map, markerData[marker]); |
22 | 22 | } |
23 | 23 | |
24 | 24 | function getGMaps3Marker(map, data) { |
Index: trunk/extensions/Maps/Services/YahooMaps/YahooMapFunctions.js |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | |
63 | 63 | map.removeZoomScale(); |
64 | 64 | |
65 | | - for (i in controls){ |
| 65 | + for (var i =0; i < controls.length; i++){ |
66 | 66 | if (controls[i].toLowerCase() == 'auto-zoom') { |
67 | 67 | if (mapElement.offsetHeight > 42) controls[i] = mapElement.offsetHeight > 100 ? 'zoom' : 'zoom-short'; |
68 | 68 | } |
— | — | @@ -90,7 +90,7 @@ |
91 | 91 | |
92 | 92 | var map_locations = ((zoom == null || centre == null) && markers.length > 1) ? Array() : null; |
93 | 93 | |
94 | | - for (i in markers) { |
| 94 | + for (var i=0; i < markers.length; i++) { |
95 | 95 | var marker = markers[i]; |
96 | 96 | map.addOverlay(createYMarker(marker.point, marker.title, marker.label, marker.icon)); |
97 | 97 | if (map_locations != null) map_locations.push(marker.point); |
Index: trunk/extensions/Maps/Services/OpenLayers/OpenLayerFunctions.js |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | var map = new OpenLayers.Map(mapName, mapOptions); |
34 | 34 | |
35 | 35 | // Add the controls. |
36 | | - for (i in controls) { |
| 36 | + for (var i = 0; i < controls.length; i++) { |
37 | 37 | |
38 | 38 | // If a string is provided, find the correct name for the control, and use eval to create the object itself. |
39 | 39 | if (typeof controls[i] == 'string') { |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | } |
56 | 56 | |
57 | 57 | // Add the base layers. |
58 | | - for (i in mapTypes) map.addLayer(mapTypes[i]); |
| 58 | + for (i = 0; i < mapTypes.length; i++) map.addLayer(mapTypes[i]); |
59 | 59 | |
60 | 60 | // Layer to hold the markers. |
61 | 61 | var markerLayer = new OpenLayers.Layer.Markers('Markers'); |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | bounds = new OpenLayers.Bounds(); |
71 | 71 | } |
72 | 72 | |
73 | | - for (i in marker_data) { |
| 73 | + for (i = 0; i < marker_data.length; i++) { |
74 | 74 | marker_data[i].lonlat.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")); |
75 | 75 | if (bounds != null) bounds.extend(marker_data[i].lonlat); // Extend the bounds when no center is set. |
76 | 76 | markerLayer.addMarker(getOLMarker(markerLayer, marker_data[i], map.getProjectionObject())); // Create and add the marker. |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | 'WMSGetFeatureInfo', 'ZoomBox', 'ZoomIn', 'ZoomOut', 'ZoomPanel', |
104 | 104 | 'ZoomToMaxExtent']; |
105 | 105 | |
106 | | - for (i in OLControls) { |
| 106 | + for (var i = 0; i < OLControls.length; i++) { |
107 | 107 | if (control == OLControls[i].toLowerCase()) { |
108 | 108 | return OLControls[i]; |
109 | 109 | } |
Index: trunk/extensions/Maps/Services/OpenStreetMap/OSMFunctions.js |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | 'WMSGetFeatureInfo', 'ZoomBox', 'ZoomIn', 'ZoomOut', 'ZoomPanel', |
59 | 59 | 'ZoomToMaxExtent']; |
60 | 60 | |
61 | | - for (i in OLControls) { |
| 61 | + for (var i =0; i < OLControls.length; i++) { |
62 | 62 | if (control == OLControls[i].toLowerCase()) { |
63 | 63 | return OLControls[i]; |
64 | 64 | } |
— | — | @@ -70,13 +70,13 @@ |
71 | 71 | var self = this; |
72 | 72 | this.mapId = mapId; |
73 | 73 | |
74 | | - for (key in mapParams) |
| 74 | + for (var key = 0; key < mapParams.length key++) |
75 | 75 | this[key] = mapParams[key]; |
76 | 76 | |
77 | 77 | // Add the controls |
78 | 78 | this.mapOptions = {controls: []}; |
79 | 79 | |
80 | | - for (i in this.controls) { |
| 80 | + for (var i = 0; i < this.controls.length; i++) { |
81 | 81 | if (typeof controls[i] == 'string') { |
82 | 82 | if (this.controls[i].toLowerCase() == 'autopanzoom') { |
83 | 83 | //if (this.height > 140) this.controls[i] = this.height > 320 ? 'panzoombar' : 'panzoom'; |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | bounds = new OpenLayers.Bounds(); |
118 | 118 | } |
119 | 119 | |
120 | | - for (i in this.markers) { |
| 120 | + for (var i = 0; i < this.markers.length; i++) { |
121 | 121 | this.markers[i].lonlat.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913")); |
122 | 122 | if (bounds != null) bounds.extend(this.markers[i].lonlat); // Extend the bounds when no center is set |
123 | 123 | markerLayer.addMarker(getOSMMarker(markerLayer, this.markers[i], this.map.getProjectionObject())); // Create and add the marker |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | var map = new OpenLayers.Map(mapId, this.mapOptions /* all provided for by OSM.js */); |
142 | 142 | |
143 | 143 | if (initializedContols) { |
144 | | - for (i in initializedContols) { |
| 144 | + for (var i = 0; i < initializedContols.length; i++) { |
145 | 145 | map.addControl(initializedContols[i]); |
146 | 146 | initializedContols[i].activate(); |
147 | 147 | } |
Index: trunk/extensions/Maps/Services/GoogleMaps/GoogleMapFunctions.js |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | map.setMapType(mapOptions.type); |
98 | 98 | |
99 | 99 | // List of GControls: http://code.google.com/apis/maps/documentation/reference.html#GControl |
100 | | - for (i in mapOptions.controls){ |
| 100 | + for (i = 0; i < mapOptions.controls.length; i++){ |
101 | 101 | if (mapOptions.controls[i].toLowerCase() == 'auto') { |
102 | 102 | if (mapElement.offsetHeight > 75) mapOptions.controls[i] = mapElement.offsetHeight > 320 ? 'large' : 'small'; |
103 | 103 | } |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | |
142 | 142 | var bounds = ((mapOptions.zoom == null || mapOptions.centre == null) && markers.length > 1) ? new GLatLngBounds() : null; |
143 | 143 | |
144 | | - for (i in markers) { |
| 144 | + for (i = 0; i < markers.length; i++) { |
145 | 145 | var marker = markers[i]; |
146 | 146 | map.addOverlay(createGMarker(marker.point, marker.title, marker.label, marker.icon)); |
147 | 147 | if (bounds != null) bounds.extend(marker.point); |
Index: trunk/extensions/Maps/Maps.i18n.php |
— | — | @@ -1,13 +1,13 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * Internationalization file for the Maps extension |
| 5 | + * Internationalization file for the Maps extension. |
6 | 6 | * |
7 | 7 | * @file Maps.i18n.php |
8 | 8 | * @ingroup Maps |
9 | 9 | * |
10 | 10 | * @author Jeroen De Dauw |
11 | | -*/ |
| 11 | + */ |
12 | 12 | |
13 | 13 | $messages = array(); |
14 | 14 | |