Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

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

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?

Bruce Stuart
Posts: 0
Joined: Fri Oct 24, 2014 4:42 am

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

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

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

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

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

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

Hello Andy,

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

Return to “Issues”