Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, is there a way to have a Drag 'n Drop functionality while positioning a Marker? I'm using Location.module, map_location.module and gMap.module to let users locate their contents:
- initially they choose Region/City (I added some ActiveSelect AJAX loading for them)
- then click "Locate this on the Map"
- then they have only to move the marker to the right position.
Is this a planned feature? Let me know!
Regards
Comment | File | Size | Author |
---|---|---|---|
#3 | locpick.js_.txt | 3.88 KB | bdragon |
Comments
Comment #1
Wouter Van den Bosch CreditAttribution: Wouter Van den Bosch commented/subscribing
I'd love to see this as well. I'm developing a citizen participation website and usertests just showed that the bulk of people instinctively want to drag and drop the marker after its first positioning on the map.
Comment #2
farf CreditAttribution: farf commentedsubiscribing
Comment #3
bdragon CreditAttribution: bdragon commentedHow's this? (Committed to DRUPAL-5, copy of changed file attached)
Are there any other changes that you can think of to improve usability?
Comment #4
Wouter Van den Bosch CreditAttribution: Wouter Van den Bosch commentedJust tested your new code.
It works great for points you manually add to the map by clicking on it directly.
But just like the original poster of this issue, I use the map_location module which allows me to enter an address, press a button and have a marker appear on my map (on the right spot of course).
What isn't possible for some reason is dragging a marker that was placed on the map in this fashion.
I can however (funnily enough) click once next to the marker (so it relocates) and from then on it *is* draggable as well.
Any idea on how you could make markers that are placed on the map via map_location draggable from the start ?
Would be great if this was possible.
One minor usability issue that came up in our tests was the fact that people found the autozoom feature a bit disorienting. Probably because we already start on a pretty high zoom value. Hence we deleted the two zoomIn calls you have at line 30 and 31. But I could figure that other people do find this a helpful feature (especially when you start from higher up).
Cheers for the work so far!
Wouter
Comment #5
tinem CreditAttribution: tinem commentedI'm new to Drupal and haven't made my site yes but have made a lot of Google Maps API sites and would like if this has been solved, please?
Comment #6
tobedeleted CreditAttribution: tobedeleted commentedI'm also very keen to see the functionality described by Wouter above.
I have a site where each node has a map block driven by a postal code via Gmap Location. What I'm seeing in practice is that many of the markers are inaccurately positioned (is this a weakness in Google's API?) and the users want to move them to the correct position on the map.
I was wondering whether this is a configurable option via a Gmap macro behavior, but I can't locate a complete definition of what's possible using the macro feature.
I would be happy to consider a financial contribution to support any required development time on this.
Comment #7
Max_Headroom CreditAttribution: Max_Headroom commentedI'm running into what I believe are the same problems. My application is very similar.
I've 'AJAX-ified' the standard node location fields so that the map gets updated as soon as the user starts entering the address details.
I also add a marker to the map with Gmarker and map overlay. If I don't do this, the map has no marker when I update the address.
On the map I have a marker which I can drag around.
But when I click on a new area, it adds another marker.
Now I got two markers which I can drag around.
Clicking on the map, only the newest marker will jump to the clicked position.
When I click on the second marker, it gets deleted. However, now when I click around on the map the map just jumps to the position, no new marker is created.
The original marker is still where I last left it.
A work around I am going to look at is to remove the first marker as soon as I click on the map (any tips how?). Problem I foresee is the second marker that disappear when you click on it.
Comment #8
afeijono updates for this, guys? It would be an amazing feature