Google maps for 3:12+

Morning all


what would be the best approach for integrating (more than one example of) gmaps into 3:12+?



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8"/>

<title>Google Maps JavaScript API Example</title>

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=abcdefg"

type="text/javascript"></script>

<script type="text/javascript">

//<![CDATA[



function load() {

if (GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById("map"));

map.setCenter(new GLatLng(37.4419, -122.1419), 13);

}

}



//]]>

</script>

</head>

<body onload="load()" onunload="GUnload()">

<div id="map" style="width: 500px; height: 300px"></div>

</body>

</html>





…given that the onload call and the script that calls the api can be in the parse file, the CDATA section is variable and needs to be in the head…



…and thinking ahead, being able to edit the placemarkers and call other assets would be great…



thoughts?

Off the top of my head:

  1. Create a blank design that just contains a "body" design area.
  2. Create a paint layout that contains the overall code, with the placemarkers as metadata from a Data Record asset.
  3. Apply the paint layout to data records.



    When you preview, it should embed the map.



    … I think. :slight_smile:

Check out http://www.griffith.edu.au/about-griffith/campuses for our matrix google maps implementation.


Aleks

[quote]Check out http://www.griffith.edu.au/about-griffith/campuses for our matrix google maps implementation.


Aleks

[right][post=“14949”]<{POST_SNAPBACK}>[/post][/right][/quote]



Cooool…How’s that one built Aleks?

We make use of the functions discussed here for better onload event handling.


We have a addload.js file included in every design, which is used in our javascript (inserted in the content divs) for the google maps. Have a look at the source of the campus maps page for an example.

NSW electoral commission have got some google maps stuff live as well, might be worth a look:
http://www.elections.nsw.gov.au/state_government_elections/electoral_districts/electorate_index

(each district has it’s own polling places map)

These are great examples. We have something similar for our AIS Sport Programs.


Has anyone found a service where you can enter multiple (I'm thinking hundreds) addresses and produce long and lat. I'm sure we can find someone to pay to do this but interested in knowiing if anyone's found some free sites.

[quote]Has anyone found a service where you can enter multiple (I’m thinking hundreds) addresses and produce long and lat. I’m sure we can find someone to pay to do this but interested in knowiing if anyone’s found some free sites.
[right][post=“14970”]<{POST_SNAPBACK}>[/post][/right][/quote]



I have seen recently that the Google Maps API now supports geocoding (address -> lat/long) using both the Javascript and XML interfaces for Australian addresses. Check out the API page to get a key and then set up a script to send SOAP requests to the API and you should be able to encode all the addresses you need to.

Looks like http://www.geonames.org/ might be able to help

Thanks for the help Darren and Andrei. Much appreciated.