From: Tom Hughes Date: Thu, 30 Aug 2007 10:42:32 +0000 (+0000) Subject: Setup the layers before adding any marker so that the marker layer X-Git-Tag: live~8197 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/50ba6446022079b18326ab14a05ef322ee180100 Setup the layers before adding any marker so that the marker layer will get turned on if it was off in the layers string. --- diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 41b2b86f2..bbd1a8a77 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -88,14 +88,14 @@ 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();