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: [Jake] Help with Google Maps

By jghoward - August 28, 2009 - edited: August 28, 2009

I'm so glad this tutorial is here. Before I get started, can you tell me if the instructions are the same if I want to show a map for just one record on a details viewer page?

UPDATE:
Awaiting your answer, but in the meantime I've made some progress.

Instead of the list code, I generated the header for the detail page.

Then, to center my map on the same point for which my record needs a marker, I used this code:

<?php foreach ($listingsRecords as $record): ?>


map.setCenter(new GLatLng(<?php echo $record['latitude'] ?>,<?php echo $record['longitude'] ?>), 13);
var point = new GLatLng(<?php echo $record['latitude'] ?>,<?php echo $record['longitude'] ?>);
var marker = createMarker(point,'<?php echo htmlspecialchars($record['street_address'], ENT_QUOTES) ?>, <?php echo htmlspecialchars($record['city'], ENT_QUOTES) ?>')
map.addOverlay(marker);

<?php endforeach; ?>

}

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.

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?

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