Index: branches/Maps0.7.x/RELEASE-NOTES |
— | — | @@ -12,6 +12,8 @@ |
13 | 13 | |
14 | 14 | * Fixed fatal error occuring when running maintenance/refreshLinks.php |
15 | 15 | |
| 16 | +* Fixed not showing up of marker for Google Maps v2 when there is only one location. |
| 17 | + |
16 | 18 | === Maps 0.7.5 === |
17 | 19 | (2011-02-16) |
18 | 20 | |
Index: branches/Maps0.7.x/includes/services/GoogleMaps/GoogleMapFunctions.js |
— | — | @@ -183,16 +183,19 @@ |
184 | 184 | myZoom = mapOptions.zoom; |
185 | 185 | } |
186 | 186 | |
| 187 | + for (var i = markers.length - 1; i >= 0; i--) { |
| 188 | + var marker = markers[i]; |
| 189 | + marker.point = new GLatLng(marker.lat, marker.lon); |
| 190 | + map.addOverlay(createGMarker(marker)); |
| 191 | + } |
| 192 | + |
187 | 193 | // possibly, create bounds from markers |
188 | 194 | if ((mapOptions.zoom == null || mapOptions.centre == null) |
189 | 195 | && markers.length >= 1) { |
190 | 196 | var bounds = new GLatLngBounds(); |
191 | 197 | |
192 | | - for (i = markers.length - 1; i >= 0; i--) { |
193 | | - var marker = markers[i]; |
194 | | - marker.point = new GLatLng(marker.lat, marker.lon); |
195 | | - map.addOverlay(createGMarker(marker)); |
196 | | - bounds.extend(marker.point); |
| 198 | + for (var i = markers.length - 1; i >= 0; i--) { |
| 199 | + bounds.extend(markers[i].point); |
197 | 200 | } |
198 | 201 | if (myCenter == null) { |
199 | 202 | myCenter = bounds.getCenter(); |