diff options
Diffstat (limited to 'www/js/views/around.js')
-rw-r--r-- | www/js/views/around.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/www/js/views/around.js b/www/js/views/around.js index 0aa3618..eb741ff 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -7,6 +7,7 @@ events: { 'pagehide': 'destroy', 'pageshow': 'afterDisplay', + 'click #relocate': 'centerMapOnPosition', 'click #mark-here': 'onClickReport' }, @@ -85,6 +86,8 @@ fixmystreet.map.getProjectionObject() ); + FMS.currentPosition = centre; + var point = new OpenLayers.Geometry.Point( centre.lon, centre.lat ); fixmystreet.location.removeAllFeatures(); @@ -104,6 +107,13 @@ fixmystreet.location.addFeatures([ x ]); }, + centerMapOnPosition: function(e) { + e.preventDefault(); + if ( FMS.currentPosition ) { + fixmystreet.map.panTo(FMS.currentPosition); + } + }, + noMap: function( details ) { this.locateCount = 21; $('#locating').hide(); |