I want to be able to embed my map within the middle of my content. I don't want to use the block. I am using a special tpl for a "property" content type and am manually placing all my fields in the template using the $node object.

I see that the long/lat is in the title element of the coordinates information in the "view" array element, but it would be great if the long/lat fields were available independently. In fact, it would be good if all location CCK fields were available in the $node object independently to allow for advanced themeing.

The idea is that I want to pass the long/lat values into theme array for GMAP as seen below:

$mymap=array('id' => 'mymap',
    'latitude' => '49.19258642226091',
    'longitude'=>' -123.17647933959961',
    'zoom' => 10,
    'width' => '100%',
    'height' => '200px',
    'type' => 'map',
    'markers' => array(array(
        'markername' => 'small red',
        'latitude' => '49.19258642226091',
        'longitude' => ' -123.17647933959961',
    )),
);
echo theme('gmap', array('#settings' => $mymap));

Another is to do a block load in the template, but I think that offering all location fields for themeing is a good solution, too, because it will solve other themeing problems.

THANKS!

Comments

yesct’s picture

Issue tags: +Location theming

I think they might be available after a location_load_location()?

tagging too.

capellic, did you find a solution that worked for you?

nickl’s picture

Title: Improved data access for advanced themeing » node view gmap: themeing fix
Status: Active » Closed (won't fix)
Issue tags: +View map, +node view gmap

Status to Won't fix - meaning won't fix like this. (You have some time to change it to something else but eventually it will close)

Motivation:
Name changed in an attempt to categorise our requirements, by suggested fix.
To conserve time, mine, I will leave it to yourselves to ponder my reasoning.
Allow me to suggest that we identify duplicate issues to close, there are far to many open issues.
I am convinced the feature requirement: gmap in node view, location_cck fix will far better be suited complete with theme support.

Anybody want to wager that this solution has already been mentioned elsewhere in this queue, multiple times.
Who's gonna find the first one?