So I create a marker and make it draggable. It works good. I am trying to make this only true when in edit markers mode. My problem is when I am not in edit mode I cant turn it off. I have tried in setOnMarkerClickListener by doing marker.setDraggable(false) but that only works if the user clicks the marker first then tries to drag it, I have tried doing it in the onMarkerDragStart section but only works after the marker is dragged once but then since the marker is not draggable it never goes back to that section even in edit mode to turn it back on. I need a way to turn all markers draggability false when not in edit mode and true in edit mode. Any help would be so very much appreciated!
Set Google Maps API V2 markers draggable attribute to false after creating it?
463 Views Asked by BB Developer At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in GOOGLE-MAPS
- Google Maps API Re-size
- Google Map Custom InfoWindow's Tail Won't move and can't remove dropshadow
- how show result the autocomplete in the map in CodeIgniter Google Maps V3 API Library?
- GoogleMaps or OpenStreetMap get graph
- GoogleMap.addGroundOverlay() takes a lot of UiThread time
- Reverse geocoding with a deferred object in a coffeescript class
- Can I get Google maps to ignore part of a search?
- IOS Google Maps skid fit bounds
- Accessing Google Maps Markers in 2D-array from outside
- kmllayer with polygons hide map
- How to specify the delay for the google map marker
- Google Maps API v3 - change strokeWeight of polylines for different zoom levels
- Pop-up info box in google maps
- Logo Markers over 3D Maps View
- How can i add polygon on google maps IOS?
Related Questions in GOOGLE-MAPS-MARKERS
- Google Map Custom InfoWindow's Tail Won't move and can't remove dropshadow
- How to get geographical coordinates in google maps API V2 android using an string address?
- Android Maps ClusteredMarkers - don't show unclustered?
- Hiding markers in googlemaps v3 in an object
- How to remove individual markers in Google maps api3
- Google Map Mark Not Working
- Write text in Google Map v2 custom marker - Android
- NullPointerException with Clusterer Makers, Using Clusterer Library
- permanently deleting markers from an array
- How to add custom data to marker (Google Maps API SWIFT)
- How to change the clicked marker icon using android-maps-utils?
- How to take an javascript object out of a database query to access in the rest of the script
- Update markers on google maps on new wikimapia place request
- mouse over of lower z-index is called even when its hidden behind the more z-index element
- How to customize heatmap color on pre decided constraint values?
Related Questions in GOOGLE-MAPS-API-2
- How to get geographical coordinates in google maps API V2 android using an string address?
- how to pass image drawables and text dynamically to the infowindow adapter?
- Issue with Google Maps toScreenLocation() method Android
- How to calculate time between 2 geopoints given a route
- my IconGenerator.makeIcon() doesn't work
- How to customize heatmap color on pre decided constraint values?
- Weird App not working on different mobile
- Google Maps API v2 Android Studio Map not loading
- Android Google Map - Error inflating class fragment
- How can I change the location in a map using javascript and google maps?
- Google Maps Android API V2 crashes
- NullPointerException Google Maps API Android 4.4.4
- Longest path between two points in google maps
- Sending alert to user when he is near to a specific location
- Google API not showing marker on all the registered places
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I'm not sure what you mean by "edit mode". If I understood correctly, you have a markers that you want to make non-draggable. Make a new ArrayList and as you create a marker, add it to the list
For example:
Now, to make them all non-draggable, make a loop which iterates through the list of markers.
Edit
set the markers dragable in a loop