The marker action for my map is set for open link. Yet when you click on the marker, an info window tries to open (see image). It never fully opens. Ultimately you are directed to the node. Any clues to what might be causing this? I disabled caching, but the problem persists. Thanks for this outstanding module.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | Click-marker-anomaly-issue-452316.patch | 748 bytes | ñull |
| #3 | Click-marker-anomaly-issue-452316.patch | 857 bytes | ñull |
| gmapanomoly.jpg | 60.53 KB | bwv |
Comments
Comment #1
electricmonk commentedThis happens because of this code block:
As you can see, bdragon has noted that there's a problem there. However, no on seems to have solved this yet. bec? bdragon? I'm reluctant to touch anything myself as this module is kinda complicated, structure-wise.
Comment #2
bwv commentedApologies, I had not seen this... thanks for pointing it out.
Comment #3
ñull commentedI did not do what bdragon requested, because this is already theme code or I simply don't understand what he means.
But I think I found a fix for the bug. Replace the code in #1 with my code and it should work fine:
The thing is that the pop up class was added no matter what. Now it is only added when it should.
Comment #4
ñull commentedComment #5
ñull commentedReviewing my own fix I realise that the marker mode is valid for all markers so there is no need to check inside the loop.
Both will work but this last one is better.
Comment #6
ñull commentedComment #7
electricmonk commentedBut this still inserts theming-related code into a business-logic related code, which is a no-no IMO :)
Comment #8
j0rd commentedI'm always receiving black infowindows aka. popups when I click on the markers. Does anyone else have this issue as well?
I believe it's because of bad code in theme_gmap (or something that passes the args into it).
Here's the code in the module
But if you do a dpm() in that's foreach($maps['markers']) you'll notice that $marker['text'] is never set.
Instead you can find the value for the title in $marker['opts']['title'];
This function is also not respecting the theme_gmap_location_infowindow_node theme override as mention in THEMEING.txt
So this code should look like this
Or more precisely gmap_location.module should get getting the info window HTML from gmap_location_infowindow_node as the documentation reads.
Comment #9
shushu commentedI got into the same piece of code, with a different problem.
I wanted the marker to just "redirect" to another url. marker.js won't make it happen as long as the marker has a 'text' field.
I think com2's patch is ok, but I will add:
if (isset($marker['text'] ))before setting anything...
electricmonk, it is true that this is not the right place for it, but I think we rather fix the bug as is, since the code is already there in 6.x-1.1-rc1.
Regarding to my own problem, I will send my patch to gmap_location.module for adding marker mode in the block map.
Comment #10
droope123 commentedHi.
This issue is not nearly solved, needs to be fixed.
For those wanting to add some stuff to the bubble, and are in need to get this working NOW, here is how I did it.
This code, in gmap.module (line 882)
Would go to this =>
Those variables ($marker['opts']['phone']) aren't defined by default, so you have to go to gmap_location.module and set them yourselves.
gmap_location.module (line 678)
goes to:
Add an "echo print_r($node);" somewhere to know what data you can add.
Cheers!
Droope
Comment #11
bdragon commentedTemporary fix committed.
http://drupal.org/cvs?commit=296358
http://drupal.org/cvs?commit=296360
This should enable the other marker modes to work as intended. (See js/marker.js starting at
// Default marker actions.to see how this all works on the JS side.)Comment #12
johnvClosing this very old issue. Please reopen if it is still valid.