From 50ba6446022079b18326ab14a05ef322ee180100 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 30 Aug 2007 10:42:32 +0000 Subject: [PATCH] Setup the layers before adding any marker so that the marker layer will get turned on if it was off in the layers string. --- app/views/site/index.rhtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(); -- 2.43.2