I have the location information enable for my Event content type. I want to show an embedded Google map with the location designated when viewing a node. I see the Display Settings section in the content type edit form. I see that I can "Display location in teaser view" and/or "Display location in full view", but I how do I indicate I want the embedded map? The GMAP configuration indicates that this is supported, but how do I get Location to do this on the node level?

THANKS!!!

Comments

petiar’s picture

subscribing

theabacus’s picture

subscribe

dannypfeiffer’s picture

I'm curious how to do this as well...

I know you can just embed a gmap with static options, like the nodemap (with lat / lon set to the nodes lat / lon).. but i can't figure out how to dynamically call the node's lat lon....

[gmap |id=nodemap|center=39,-121|zoom=12|width=400px|height=200px|markers=blue::39,-121]

henrijs.seso’s picture

Is this what you are looking for?

Now instead of displaying views content in a 'list' your content will appear in a Google map.

http://drupal.org/node/61335

capellic’s picture

I am really more interested in embedding the map in a node display - not a view.

But on the topic of views, I find it odd that we're limited to the strings (view field options below) and that there is no embedded map option. I am thinking that this may be more of a GMAP responsibility, but since GMAP works as a support module to Location, I am also thinking that it should be visible through Location?

Location: Address
The entire address block for the location.

Location: City
The city of the selected location.

Location: Coordinates
The coordinates of the selected location in 'lat, long' format.

Location: Country
The country of the selected location.

Location: Distance
The distance from the selected location and either the current user or a specific location.

Location: Latitude
The latitude of the selected location.

Location: Lid
The location ID of the location.

Location: Longitude
The longitude of the selected location.

Location: Name
The name of the selected location.

Location: Postal Code
The postal code of the selected location.

Location: Province
The province of the selected location.

Location: Street
The street address of the selected location.

henrijs.seso’s picture

You can add map to node by adding block "location" - it works fine and displays marker too

dannypfeiffer’s picture

ahhh... beautiful.

Thanks much.

petiar’s picture

I can't find this block :-o what module is it part of?

thanks,
petiar

henrijs.seso’s picture

Location map block under Blocks.

capellic’s picture

I think it would be helpful to have instructions on how to display the map (using the block) on a node page in the README file.

summit’s picture

Subscribing,
greetings,
Martijn

kirkcaraway’s picture

I'm not seeing any Location map block on my blocks page. Is there some more detailed documentation on this? Thanks.

kirkcaraway’s picture

I think there is some miscommunication here. I do not see how a block plays into showing the map on the finished node page. I can see the map when creating or editing the node. I just can't get it to show up after I save it. I can see the location information, but not the map. There has to be something I'm missing in the setup somewhere, possibly in the Content Types configuration.

Does anyone have any tips to offer? Thanks.

socialnicheguru’s picture

subscribing

nickbits’s picture

subscribing

henrijs.seso’s picture

No, its just the way it is. Enable location block to add it to content area and when you will view node, block will show up, kinda. I know its stupid system, but i guess location module suffers from its own legacy.

liquidcool’s picture

I tried out the block and it works, but it's displayed after *all* node content - including comments. So if you have just a few comments, it's not obvious that you even have a map without scrolling all the way down. If I could get it above the content, that would be doable. Is there any way to do that? If not, I guess I'll have to forgo the map entirely and rely on the Google Maps link.

I really hope embedding it in the node itself is somewhere on the road map - that would be killer.

mediahackers’s picture

You can place a block within the contents of a node by referring to this post -

http://drupal.org/node/26502

And see it in action here -

http://www.gotimeshare.org/timeshareplaces/0075-timeshare-miami-magic-ci...

The specific code I am using is:

$block = module_invoke('gmap_location', 'block', 'view', 0);
print $block['content'];

Don't forget to turn on your PHP filter.

yesct’s picture

Component: User interface » Documentation

Also, in your content type, if it is a cck content type, you can add cck fields to it, like a ViewField (or ViewsField) and that View can be a view that uses the display "gmap". Then you can drag and drop and reorder the map within the content (or cck fields that store your content).

I agree documentation is needed.

yesct’s picture

Status: Active » Fixed

I started a new issue and will try and get some documentation up. See #434714: documentation/faq/help

I'll mark this one fixed because I think a lot of ways to get the map on the node are listed above.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

joey santiago’s picture

@ mediahackers : hei, that sounds an interesting way how to get it work... but actually it doesn't work for me:

i'm running drupal 6.13 and both latest releases of gmap and location modules.

Neither the Location Map Block works for me... any idea?

thanks a lot

agerson’s picture

Having a choice in the CCK field to display it as a link or embedded map on the node would be cool!

nickl’s picture

Title: How do I enable an embedded map for a node? » node view gmap: block fix

I am glad this issue is closed and well worth remembering for documentation.

There is a final solution to fix this problem permanently, I believe it to be a cck fix.

Here is the issue for this now: node view gmap: location cck fix which will make cck handle the node view with map included and enable theme support.