Hi everybody,

I've been trying to display the location field with an embedded map (provided by GMap ) in my custom node-xxx.tpl.php.

To do this, I've been looking for the formatter associated to this and tried the following :

$content['field_geolocalisation']['#formatter']="location_all";
print render($content['field_geolocalisation']);

However, there do not seem to be any difference with the default formatter, so am I missing something?

Thank you very much !

Michaël

Comments

mikavirt’s picture

Well, I found a solution, eventhough that doesn't really answer my question :

gmap_simple_map() displays the required map, see http://drupalcontrib.org/api/drupal/contributions!gmap!gmap.module/function/gmap_simple_map/7 for parameters.

I was hoping there would be a way to make the location module call this method, but I'm happy it works :)

mikavirt’s picture

Status: Active » Closed (fixed)