I have spent way too long trying to make this work. I first installed location module with gmap. While my nodes would not show the map, they would show location information with a link to google maps. I played around (for too long) trying to get a map to show up on the node. At some point, I lost the link to google maps, and just had location with lat&lon. This was a step backwards. So I ended up removing all gmap modules and kept location. But I can't seem to get my link to google maps back.
I have tried uninstalling all location/gmap modules and reinstalling location, with no luck. I have upgraded to the latest dev of location with no luck. And yes, I have 'google maps' selected under the map links section for my region. Any suggestions as to what I might be missing?
Comments
Comment #1
Ceb commentedAdded comments : I am located in Canada and have tried enabling links for mapquest and yahoo maps with no success either.
Comment #2
Ashford commentedIn the admin settings for the module, there are 2 tabs where you select the country.
/admin/settings/location/maplinking
/admin/settings/location/geocoding
Comment #3
steveoliver commentedI'm having the same problem. I've been searching online half the day... :S
Comment #4
Ashford commentedAfter you enable the Geo-coding setting, it activates a second setting on that same page. Scroll back down to your country's name and there will be a new link called 'configure'. You have to enter your Yahoo/Google key.
Ashford
Comment #5
Ashford commentedI saw this in another post. If you go in the content_types, you can enable-disable the display of each of the location fields. You must enable 'Country' or the 'See Map' link will not show. See if that solves your problem.
Comment #6
davea commentedAshford,
Thanks for that response but after trying everything in this thread I can't get the map or the map links to display. The dev load tab shows that the locations are loaded but the map_link never does get added to the node, nor the $content var.
Thanks,
DaveA
Comment #7
Ashford commentedHave you seen this forum thread? http://drupal.org/node/346694
It references to Location ver 6.x-3.x-dev; however, there is a note from someone who used the same solution with success on ver 5.
Comment #8
jeffschulerThanks, Ashford.
bdragon looks to have rolled the fix into 5.x-3.x-dev.
Using that version (2009-Feb-10) solved this issue for me.
Comment #9
bdragon commentedYeah, I had broken it and not noticed until after the 3.0 releases were out.
Should be fixed in 3.1 RC1.
Comment #10
caver456 commentedHi - I just got the identical problem in 3.1 rc1 - enable country and the map link is there; disable it and it goes away.
Thanks
Comment #11
dwwMarked #412102: Map link not working when country is hidden (patch included, change to patch needs feedback) duplicate with this. I can confirm the bug with rc1. The problem is that inside template_preprocess_location(), we do the following:
1) grab the $location object with full information from $variables['location']
2) go through the settings and unset all the fields from $location we're trying to hide from display
3) if we're not hiding the map link, we call location_map_link($location);
So, at step #3, if you're trying to hide the display of the country, the map link automatically disappears, since location_map_link() requires the country to even know what kind of link(s) to generate.
mikl posted a patch over at #412102 that fixes the bug:
http://drupal.org/files/issues/location.module_30.patch
at step 3, instead of using $location, it calls:
location_map_link($variables['location']);-- what way, we've still got all the data for the map link, including the country, regardless of if you're trying to hide certain fields or not.The patch still applies to the end of the DRUPAL-6--3 branch (with a few lines offset), it's seems like a very sane solution to the problem (not sure what would be better than using $location to decide if we want the map link, but then the full data from $variables['location'] to actually generate it) and I've confirmed it fixes the bug.
Hence, RTBC. ;)
Comment #12
ankur commentedFixed in HEAD, DRUPAL-6--3 using mikl's patch from http://drupal.org/node/412102 (referenced in #3 above).
Comment #13
ankur commentedComment #14
yesct commentedhttp://drupal.org/cvs?commit=347472
http://drupal.org/cvs?commit=347474