Posted by socceronly on October 22, 2009 at 11:47pm
I have given up on Location + Gmaps + CCK + views + views_attach ect... for now. 20 Hours I can't get a map out these things on a node.
Location works great for getting data in, but getting that data back to show a map on node is just not working for me. (as a Field)
Embed Google Maps field is simple and works great. It would be awesome if it had an option to grab the coordinate data from the nodes Location info.
The block worked but the block on a page with comments just creates a new bunch of problems, unless there was some way to get the comments below the block....
Comments
...
There are quite a few settings to get a map to display. I certainly understand your frustration. Have you done all of the following:
- Check the display fields setting on your content type. Make sure your location field is set to display the data and a map
- Make sure you have geocoding enabled for the country you're using
- You have a Google Maps API code
Too right!
Any ability to configure the module and/or its output would be terrific
Ade Atobatele
I've accomplished something similar...
I created a content template using the contemplate module... In the template, I embedded google map source code. And swapped out the actual address's with $node[field_address] > placeholders.
You can also grab variables from a module like GEOsniper to include in the google code.
So from google maps came...
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=4920+pontiac+lake+rd,+waterford+mi&sll=37.0625,-95.677068&sspn=30.323858,56.513672&ie=UTF8&hq=&hnear=4920+Pontiac+Lake+Rd,+Waterford,+Oakland,+Michigan+48328&ll=45.644768,-84.111328&spn=10.753472,18.676758&z=5&iwloc=A&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=4920+pontiac+lake+rd,+waterford+mi&sll=37.0625,-95.677068&sspn=30.323858,56.513672&ie=UTF8&hq=&hnear=4920+Pontiac+Lake+Rd,+Waterford,+Oakland,+Michigan+48328&ll=45.644768,-84.111328&spn=10.753472,18.676758&z=5&iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small>After I swapped out the Values in the code...
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=<?php print $node->field_address ?>&sll=37.0625,-95.677068&sspn=30.323858,56.513672&ie=UTF8&hq=&hnear=<?php print $node->field_address ?>&ll=45.644768,-84.111328&spn=10.753472,18.676758&z=5&iwloc=A&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=<?php print $node->field_address ?>&sll=37.0625,-95.677068&sspn=30.323858,56.513672&ie=UTF8&hq=&hnear=<?php print $node->field_address ?>&ll=45.644768,-84.111328&spn=10.753472,18.676758&z=5&iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small>You'll have to do a little bit of tweaking to get the map positioning right, but I figured this might help.