Permalink
Browse files

fixed access to point page

  • Loading branch information...
1 parent 68665dd commit 724fe3b2e3783055d7afe9426b84d057f5397f78 @igorsobreira committed Aug 16, 2010
Showing with 12 additions and 2 deletions.
  1. +12 −2 wifimap/media/js/page.js
View
@@ -129,8 +129,18 @@ var SpotListPage = {
var SpotDetailPage = {
load: function() {
- $('#content').load(Page.getCurrent());
- SpotManager.addSpotsToMap();
+
+ var loadContent = function() {
+ $('#content').load(Page.getCurrent());
+ SpotManager.addSpotsToMap();
+ };
+
+ if ( !(Map.map.getCenter()) ) {
+ SpotManager.setCenter( loadContent );
+ } else {
+ loadContent();
+ };
+
},
unload: function() {
Map.removeAllMarkers();

0 comments on commit 724fe3b

Please sign in to comment.