Help with Google Maps

24 posts by 9 authors in: Forums > CMS Builder
Last Post: January 20, 2010   (RSS)

By ross - March 5, 2009

Hi John

I think we are getting mixed up when we say view source :).

If you are viewing the source on the actual page, you won't see the php code. If you do, something isn't working quite right.

Would you mind posting me a copy of your template page (The one where you have your map code on) and a copy of the section schema (you'll find that in your /data/schema folder. Probably called listings.ini.php or something similar).

With that, I can run some tests internally for you :). Another option would be to email FTP details to your server. You can fill out a support request for that here:

https://www.interactivetools.com/support/email_support.cgi

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [jghoward] Help with Google Maps

By Chris - September 3, 2009 - edited: September 3, 2009

Hi jghoward,


Okay, so my map is working when I load record number from end of url i.e. map.php?address-field-1
Can you tell me how to call the iframe from listingsDetail.php in a way that dynamically loads the correct map.


You'll want to do something like this, but change $listingsRecord to the name of the record variable if it's different:

<iframe src="/path/to/map.php?<?php echo $listingsRecord['num'] ?>" width="550" height="350"></iframe>


Will this approach work? Is there a better way?
Why do I need the iframe? Can't I just load the map on the same listingsDetail.php?address-field-1 page?


Yes, it will work. There's really nothing wrong with this approach.

More recent versions of the Google Map API do away with the <iframe> in favour of a <div>. If you're interested in that, I've attached a sample listing page (for multiple records) which uses the V3 API! :D

I hope this helps! Please let us know if you have any questions or comments.
All the best,
Chris
Attachments:

listingsmap.php 3K

Re: [chris] Help with Google Maps

By Codee - January 20, 2010

here's another site that makes it easy to get the longitude and latitude for locations:
http://stevemorse.org/jcal/latlon.php