diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/map-OpenLayers.js | 2 | ||||
-rw-r--r-- | www/js/views/around.js | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js index cf27934..c5ce747 100644 --- a/www/js/map-OpenLayers.js +++ b/www/js/map-OpenLayers.js @@ -286,11 +286,11 @@ function show_map(event) { if (!fixmystreet.map.getCenter()) { var centre = new OpenLayers.LonLat( fixmystreet.longitude, fixmystreet.latitude ); + FMS.currentPosition = { latitude: centre.lat, longitude: centre.lon }; centre.transform( new OpenLayers.Projection("EPSG:4326"), fixmystreet.map.getProjectionObject() ); - FMS.currentPosition = centre; fixmystreet.map.setCenter(centre, fixmystreet.zoom || 4); } diff --git a/www/js/views/around.js b/www/js/views/around.js index b9b7fc7..3c2c2d1 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -45,18 +45,17 @@ if ( !fixmystreet.map ) { show_map(); } else { + FMS.currentPosition = coords; var centre = this.projectCoords( coords ); - FMS.currentPosition = centre; fixmystreet.map.panTo(centre); } FMS.locator.trackPosition(); }, positionUpdate: function( info ) { + FMS.currentPosition = info.coordinates; var centre = this.projectCoords( info.coordinates ); - FMS.currentPosition = centre; - var point = new OpenLayers.Geometry.Point( centre.lon, centre.lat ); fixmystreet.location.removeAllFeatures(); |