Very basic task: How do I display a map in a regular page node, set to a default location? I just need it for a simple Contact Page, like this one:

http://www.microcenter.com/at_the_stores/st_louis_park.html

I have Gmap, Gmap Location, Gmap Macro Builder, Gmap Views Integration, Location, Location Views.

Help?

Comments

tom_o_t’s picture

Assigned: Unassigned » tom_o_t

1. You need to set up one of your input formats to automatically filter the GMap macro. Go to administer -> site configuration -> input formats. For filtered HTML (or any, or all) click 'configure'. Tick the GMap filter, and save.
2. Click 'Build a GMap macro' (usually in your main menu on the left of the page) and create your map at the scale and location you want, with the marker type etc. or your choice. Copy the macro code
3. Create a new page and paste the macro into the body, make sure the input format is set to the one you configured in step one, and preview/save. It should work!

If you want to add a popup window with the field for driving directions like they had in your example, I think you need to enter the html for that into the macro. An example of putting html into the Gmap macro is at http://vsmith.info/GoogleMaps

Hope this helps...
Thomas

lunk rat’s picture

Thanks this was exactly what I needed. Any more links to html/macro information. The vsmith link was great but did not show me how to do what I need. I would really like the bubble to popup by default and show "get directions" like this:

http://www.microcenter.com/at_the_stores/st_louis_park.html

tom_o_t’s picture

If you look at the vsmith example, you can see that the information between :: and |align is the html to be contained in the marker bubble on the map. So to insert the html for the driving directions, just add a marker as below:

gmap markers=numbers::44.936619,-93.351094:<form action="http://maps.google.com/maps" method="get" target="_blank"><b>Get Directions to Micro Center</b><br /><span class="descriptor">Start address:</span><br /><input type="text" SIZE=40 MAXLENGTH=40 name="saddr" id="saddr" value="Street, City, State, Zip" class=descriptor  onFocus="this.value=\'\';" /><br><INPUT value="Get Directions" TYPE="SUBMIT" class=descriptor><input type="hidden" name="daddr" value="44.936619, -93.351094"/></form> |align=Left |zoom=6 |center=44.936619,-93.351094 |width=550px |height=550px |id=Spain |control=Large |type=Map

I did a view source on the example that you linked to and copied their html to this macro. There may be some bugs with unescaped characters - but this should be enough to give you an idea of how it works.

Let me know how you get on...

marcoBauli’s picture

Status: Active » Closed (fixed)

no followup since more than 6 months now. Let's consider this fixed, please reopen if is the case.

pengi’s picture

Status: Closed (fixed) » Active

I'd like to reopen this issue; I'm not able to get the driving directions in particular to work. I've emulated the example code that was posted above and what I get is a nothing beyond the map and the marker when node is viewed. In fckeditor, I get what seems to be a form but it doesn't look quite right. Note that I edit the macro in plain text. I would like the driving directions to work like it does on the Micro Center map. I couldn't figure out much from the source of that page. Can anyone give this another try?

Oh, I noticed as it was submitting the version was 5.x. I'm using 6.x, and only have gmap and gmap macro builder turned on. Location does not seem to be available for 6.4, so GMap Location can't be enabled (whatever it is)

podarok’s picture

Status: Active » Closed (won't fix)

release unsupported
feel free to open issue against latest 7.x dev