PDA

View Full Version : Example: Integrating Google Maps into AMS



TJS
06-02-2006, 09:56 AM
Here's a simple example of how to integrate google maps into AMS. There is tons of additional functionality you can add using the published API:
http://www.google.com/apis/maps/documentation/

In this example user instructions are substituted into the javascript in the maps.html document. It sounds like you could get return values from the site, but I haven't tried that yet.

Some helpful links when using this example:

1) Sign up for your own Google API Key and add it to the maps.html in the Docs folder
http://www.google.com/apis/maps/signup.html

2) Look up some coordinates to enter when you preview/build the app
http://geocoder.us/

johnraus
06-02-2006, 06:24 PM
Thnx, great tip, worth looking into ...

V3RT1G0
06-07-2006, 09:33 PM
wow very nice... will definately use in an app :cool

lucasecpc
08-18-2006, 04:29 PM
When I go to get an API Key what URL should I enter?

altyfc
11-09-2006, 09:04 AM
We have recently developed a tool that works in conjunction with Google Maps and this might help those of you that want to avoid going down the API route. It's a very simple tool that allows you to quickly create custom Google Maps for free. You plot whatever information you want, and then just grab some code... and you can embed it in a web page, a forum post or in an email.

If you'd like to check it out, the URL is http://www.aardvarkmap.net - any feedback on it would be welcomed.

Thanks

Aaron

Zapperz
04-29-2009, 08:27 AM
I just went to google map, put in my address, found the map area to my house, then copied that URL and then just went to that web site addrss. It worked fine but only the 1st time, I open the link, and I if i leave that page and go back it doesn't refresh and work a second time. I don't know how to use and API or java code, so googles link is nice, but it is over my head technically unless someone would be kind enough to post the code.

I am making business cards and I want the google map to be a button on the contact page i am setting up.

any help would be appriceated

.SWFGames
11-09-2009, 02:17 PM
Is it possible to search for areas using a search box, like on the real google maps?

DaSoulRed
11-12-2009, 10:42 AM
Well this is a nice one....

I wonder where can change de view mode the default is "map mode"

How can we change to "satelite mode"

here is the code at the html file

<head>
<meta **********="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=YOUR_KEY_HERE"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(21.131038, -101.677494), 13);

}
}
//]]>
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 716px; height: 408px"></div>
</body>
</html>

holtgrewe
11-12-2009, 01:03 PM
DaSoulRed


Well this is a nice one....

I wonder where can change de view mode the default is "map mode"

How can we change to "satelite mode"

here is the code at the html file

<head>
<meta **********="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=YOUR_KEY_HERE"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(21.131038, -101.677494), 13);
map.setMapType(G_SATELLITE_MAP);
}
}
//]]>
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 716px; height: 408px"></div>
</body>
</html>

Add the line in red to your HTML...
The default is the road map.
I prefer the Hybrid...(to each his own)



Common Map Types
The following map types are commonly used in the Google Maps API:

•G_NORMAL_MAP displays the default road map view
•G_SATELLITE_MAP displays Google Earth satellite images
•G_HYBRID_MAP displays a mixture of normal and satellite views
•G_DEFAULT_MAP_TYPES contains an array of the above three types, useful for iterative processing.
•G_PHYSICAL_MAP displays a physical map based on terrain information.
You can set the map type using the GMap2 object's setMapType() method. For example, the following code sets the map to use the satellite view from Google Earth:



var map = new GMap2(document.getElementById("map_canvas"));
map.setMapType(G_SATELLITE_MAP);
hth

DaSoulRed
11-12-2009, 01:36 PM
Good Shoot There... :)

Thanks, im Using rigth Now...

Nice, thanks.

Remember Enjoy Life Any How...

Until next time Bytes ;)