Closed (fixed)
Project:
Location
Version:
6.x-3.1-rc1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2009 at 12:43 UTC
Updated:
23 Jan 2011 at 09:00 UTC
I've been using the following to generate a link to google maps from within a node template:
<a href="<?php $linktext = location_map_link_us_google($locations[0]);
print $linktext
?>">Google Map</a>However, this only works with US locations. I cannot figure out how to generate a link to non-us locations without including separate calls for each country. Can anyone help me out?
Thanks.
Comments
Comment #1
rooby commentedThe function you want is location_map_link($location = array(), $link_text = 'See map: ')
if you say
It will print a hyperlink with the text "See map: Google Maps" and wrap it in a wrapper div.
If you have map links other than the google one they will also display in the wrapper div.
It will get the country information from the location passed in and work it out from there.
If you get undefined function errors you will have to make sure you include the location.inc file as the function lives there.
You do that by calling: