Issue #338740: Display locations as polygons on gmap views originally had changes to allow locations to be displayed as polygons on a gmap view as well as allowing multiple locations to be selected on a single gmap for node locations (instead of having a different map per location).
That issue has now been split into two. That issue takes care of displaying locations as polygons and this one is for allowing multiple locations on a single map.
For this patch to work you also need to apply a patch to the location module, which can be found here - #338745: Multiple locations on a single map.
This patch is for gmap 5.x-1.1-rc1.
In the next few days I will look at porting these patches to drupal 6 as I get time.
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | DrupalMultipleLocations.png | 210.97 KB | teckcrew1 |
| #26 | DrupalCCKLocationsSection.png | 13.73 KB | teckcrew1 |
| #23 | gmap-6x-singlemap-434290-23.patch | 17.85 KB | rooby |
| #10 | gmap_single_map_5x-1x.patch | 18.06 KB | agileware |
| #6 | gmap_single_map_6x-1x.patch | 18.07 KB | agileware |
Comments
Comment #1
aren cambre commentedSubscribe. This is a GREAT improvement.
Probably should be "needs work" since patch goes to 6.x first then backported? (Am I splitting hairs?)
Comment #2
agileware commentedNo, that's fine.
Comment #3
yesct commentedtagging
Comment #4
aren cambre commentedHow is the 6.x patch looking?
Comment #5
agileware commentedGoing to start working on a patch for this for drupal 6 now.
Comment #6
agileware commentedHere it is.
This patch is for 6.x-1.x-dev (2009-Apr-18).
The patch does not apply to 6.x-1.1-rc1 but if someone really needs it to another patch can be done for it. Should be a minor change.
Please test this and let me know if you come across any issues.
*And remember, you need the patch for location here - #338745: Multiple locations on a single map
Comment #7
aren cambre commentedFor what it's worth, ran this on the June 9 1.x-dev (don't know where to find he Apr 18 dev):
$ patch gmap.module gmap_single_map_6x-1x.patch
patching file gmap.module
The next patch would delete the file locpick.js,
which does not exist! Assume -R? [n] y
patching file locpick.js
patching file locpick_multi_map.js
patching file locpick_single_map.js
I guess something changed?
Comment #8
agileware commentedI have run the patch in #6 successfully for the 2009-Jun-09 version of gmap 6.x-1.x-dev (also against HEAD from CVS).
If you put the patch file in the gmap directory and run it with:
it should work.
It won't work properly without the -p0
Comment #9
agileware commentedComment #10
agileware commentedHere is a port of the patch in #6 to drupal 5.
It is a little bit improved from the original drupal 5 patch and goes with the much better drupal 5 patch in #338745: Multiple locations on a single map comment #28.
It is for gmap 5.x-1.x-dev (2009-Apr-18).
Comment #11
aren cambre commentedTag is missing a comma.
Comment #12
mrgoltra commentedsubscribing
Comment #13
johnmullin2003 commentedsubscribing +1
Comment #14
yesct commentedtagging... actually the tag is used on many location module issues, and this ties into that. :) adding back.
See: http://drupal.org/project/issues/search?text=&projects=&assigned=&submit...
Comment #15
gjmokcb commentedI have installed the two patches, checked the "single map" box, updated all modules, etc, but locations works exactly as before. I suspect the gmap patch, because the locations patch installs smoothly, but I get variations on this error when installing the gmap patch:
patching file gmap.module
patching file js/locpick.js
Reversed (or previously applied) patch detected! Assume -R? [n] n
Apply anyway? [n] y
Hunk #1 FAILED at 1.
File js/locpick.js is not empty after patch, as expected
1 out of 1 hunk FAILED -- saving rejects to file js/locpick.js.rej
patching file js/locpick_multi_map.js
patching file js/locpick_single_map.js
If I respond "y" to Assume -R, I still get an error. If I delete locpick.js before patching, the patch complains that it is trying to delete locpick.js but can't find it. In every variation, I end up with a failed hunk.
Am I doing something wrong?
Comment #16
gjmokcb commentedClarification: I installed the patch thusly: patch -p0 < gmap_single_map_6x-1x.patch
Comment #17
aren cambre commented(reverting category)
Comment #18
agileware commented@gjmokcb:
I will be having a look at a couple of minor bugs within the next week so I'll check out your error then.
Comment #19
Chris Einkauf commentedSubscribing
Comment #20
alxp commentedSubscribing
Comment #21
rooby commentedI have done a lot of work on this (I work for Justin) and there is not really any free time for us to be working on this at the moment so I will do it in my own time.
I hope to get to it pretty soon and fix up a few more details.
Comment #22
klonossubscribing...
Comment #23
rooby commentedHere is the D6 patch for 6.x-1.1.
I have not had time to even test that it works, it is just a direct re-roll of the existing patch.
I noticed there are definitely things I would like to do a little differently with the patch in terms of code so it will need a bit of work when I get back.
But functionality wise it can still be reviewed so setting to needs review so people test.
I haven't got time to check the polygon patch so I'll do that later if no one else gets to it.
Comment #24
larowlanPatch at 23 works for me against 6.x-1.1
Comment #25
teckcrew1 commentedI am also interested to see how your doing on this patch. Looking for a way to add polygons to gmaps with locations.
Comment #26
teckcrew1 commentedrooby, Algileware,
I installed this patch but am getting some unexpected behavior. I have set my CCK to use multiple locations (see attached files) but when I create that node, I do get 1 map, but each time I click the map, the coordinates update each location with the same lat & long coordinates, and ONLY 1 marker is ever displayed on the map. As I click a new point, the marker moves to that new point. I expected this would allow me to add multiple locations on the same map.
Please tell me what I am missing???
Comment #27
rooby commented@teckcrew1:
I have not yet tested this with cck locations yet, only node locations.
I would assume that this would not work with cck locations yet, but that is one of the first things I will be looking at when I get back into this.
I've had lots of things keeping me away from it lately and I have to move house this week so it won't be until next week I get back into these patches.
Comment #28
bdragon commentedA) Splitting files here is wrong. There can be an arbitrary number of maps on the page. You can't do mutally exclusive inclusion of files. Using a behavior flag is better.
B) I'd rather it use a separate set of events to differentiate it from the single point locpick. Some sites may have listeners on the events and changing stuff here can screw them up.
C) Doing it as an editable polygon is more responsive in my experience.
Actually, I should probabaly do a rewrite of locpick in general, it's not very good code.
Comment #29
rooby commentedYeah, I came back to this a few weeks ago and ran into much trouble in relation to the two locpick files and came to the same conclusion, it definitely has to all be in the one locpick file, but I ran out of time and haven't got bcak to it yet.
It'll be much cleaner code then too and it will pretty much fix all the other somewhat dodgy parts in the current patch.
Comment #30
nwnolte commentedEDIT: Sorry, this was meant for Multiple locations on a single map.