Need marker to be fixed, only map should be movable
See original GitHub issueI do not want marker to be draggable, it should be fixed to the center of div, I want only the map to be draggable.
So that user can just drag the map and set the location by its fixed marker.
Note: Now the user has to search the marker, if lost while playing around the map. A fixed marker will help a lot.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Keep marker in center and move map around it | by Ali Zahid
The most common solution to this problem is, you put a marker in the middle of the map, and the user moves the...
Read more >Keeping a marker centered even during map move
While most of it works, but I just can't figure out how to keep the marker cenrtered during the map drag/pan. Here's what...
Read more >How can I prevent Leaflet from moving my marker while ...
Given your marker, you need the icon to be Anchored to the bottom center of the icon, for which, the following code should...
Read more >Retain Location address when moving the map marker
If I want the address to change, then I will fix the address, ... the original address there if we only need to...
Read more >Marker Clustering | Maps JavaScript API - Google Developers
To see how marker clustering works, view the map below. ... markers can only be keyboard focusable when they have click listeners
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Now it’s too simple, just set property ‘markerDraggable’ to false. For example:
I think it still does not work. The marker appears in the center once the I have dragged and dropped the map. Shouldn’t the marker stay in center even while I am moving the map ?