added function to lock map view