Page 1 of 1

Google Maps: In IONIC app how do I disable map dragging by the user?

Posted: Thu Sep 01, 2016 4:00 pm
by Andy Parker

I have a google map presented on the Ionic App.

I need to figure out how to stop users being able to drag the map around.

Any ideas?


Google Maps: In IONIC app how do I disable map dragging by the user?

Posted: Fri Sep 02, 2016 12:36 am
by Bruce Stuart

The map or the Marker? Since the map and the markers both are google objects regardless of platform - I presume you mean stop users from being able to move the marker around the map?

If so - there is a property called dragable - remove that property or set it to false using the Google Map API.

Best,

bruce


Google Maps: In IONIC app how do I disable map dragging by the user?

Posted: Fri Sep 02, 2016 6:31 am
by Andy Parker

thanks Bruce, it's the actual map I want to stop being drag as I want the bounds to be fixed until the app changes them.

I'm new to IONIC, done this many times in JQM, just not sure on the syntax as currently the map used $scope variables to centre and place the marker, so currently not extra code as Im unsure how to refer to the map in javascript.


Google Maps: In IONIC app how do I disable map dragging by the user?

Posted: Mon Sep 05, 2016 4:51 pm
by Serhii Kulibaba

Hello Andy,

Please set a parameter "draggable" = false for the map component for that: http://stackoverflow.com/questions/19...