will get turned on if it was off in the layers string.
map.setCenter(centre, zoom);
<% end %>
- <% if marker %>
- marker = addMarkerToMap(lonLatToMercator(new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>)));
- <% end %>
-
<% if layers %>
setMapLayers("<%= layers %>");
<% end %>
+ <% if marker %>
+ marker = addMarkerToMap(lonLatToMercator(new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>)));
+ <% end %>
+
map.events.register("moveend", map, updateLocation);
updateLocation();