Document marker keys
robomalo - July 24, 2007 - 15:47
| Project: | GMap Module |
| Version: | 5.x-1.x-dev |
| Component: | Documentation |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
I pass all the required variables for $map and the map shows up great EXCEPT the location marker doesn't show up. Anyone else having this problem or know how to address this? Thanks.

#1
I have a similar problem. If you find a solution please post something here and i will do likewise.
Cheers
Nash
#2
I have a similar problem. If you find a solution please post something here and i will do likewise.
Cheers
Nash
#3
i finally got the location marker to show but i cant get an info window to open. Some advise would be great. attached below is the code i changed to get it to work. Its probably a bug: I wouldnt have a clue how to fix it but if its just a work around you are looking for here goes:.
<?php
$mymarkers=array(
array(
'label' => 'BLAH BLAH',
'latitude' => '40.0',
'longitude'=> '-168.0'
)
);
$mymap=array('id' => 'mymap',
'latitude' => $node->location['latitude'],
'longitude'=> $node->location['longitude'],
'zoom' => 14,
'width' => '100%',
'height' => '400px',
'type' => 'Map',
'markers' => $mymarkers);
echo theme('gmap', array('#settings' => $mymap));
?>
yES I KNOW IT LOOKS STUPID BUT THE ONLY WAY I COULD GET IT TO WORK WAS BY PUTING IT IN ANOTHER ARRAY.
SORRry about the caps its 4:38 in the morning and i am really tiered.
Best of luck: if you come up with a solution for the label please let me know, it woud be much appreciated.
Cheers
Nash
#4
Haha good thing i stayed awake longer. Figured it out. Google maps displays tooltips and popups. Instead of a tool tip i found what a pop was defined as in the array.
So in the above code replace:
'label' with 'text'
That should do the trick.
Best of luck.
Nash
#5
Unfortunately I haven't found a solution. I will definitely be searching this weekend. If I find a fix I'll post it here.
#6
Haha. I went to the URL in my e-mail to reply without checking this page first. I can't wait to fix my site! It seems weird that you have to put the long and lat twice: once for the markers, and once for the map. You have been very helpful. Thanks.
#7
Lol! I know what you mean about implementing it. I was pretty excited when i figured it out.
well yes about referring to long and lat twice its so that you can you can have a marker and the center of the map. In my case the marker is the center of the map.
Cheers
Nash
Let me know how you went with the site.
#8
YES! That worked! Thanks so much. What did you reference to figure this out? I would like to know all the available variables.
#9
All the possible marker keys need to be documented properly.
#10
Adding this issue to my documentation rollup issue.
Marking as duplicate of http://drupal.org/node/181208.
Thank you for your issue.