var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(42.240963,-83.618987), 13);
map.setCenter(new GLatLng(42.240963,-83.618987), 13);
This option sets the center location of the map and must be configured with the latitude and longitude of the location you want the map to default to. An easy to use website to get your desired coordinates is http://www.getlatlon.com/.
This option sets the center location of the map and must be configured with the latitude and longitude of the location you want the map to default to. An easy to use website to get your desired coordinates is http://www.getlatlon.com/.
This option sets the user interface to googles predefined settings. The clickable map types and the map navigator and zoom function comes standard with this option.
Using this command will set the default map type to either map, satellite, hybrid, or terrain. To set the map type insert one of the following desired map types inside the parentheses.
G_NORMAL_MAP
G_SATELLITE_MAP
G_HYBRID_MAP
G_PHYSICAL MAP
Adding this option to your code will add a search bar to your machine. In my example I typed in Toledo, Oh and the map centered on my location with a google marker.
These are just a few of the configurable options when implementing a google map into your website. I highly recommend visiting the google map api reference documentation to familiarize yourself with all the options there are to offer
Enjoy!!
Another excellent explanation of how to use Google Maps. Thank you for the information, I'm sure it will be very useful on my project(s)!
ReplyDeleteJosh, thanks for continuation of the google maps API. Your definately making alot easier for the class (and the of the readers) to utilize this great utility. One that alot of good API's and mashups are already using.
ReplyDeleteThank you for these examples of the Maps-API. The API has that much options to work with Google Maps. I tried it by myself and its great!
ReplyDeleteJoshua,
ReplyDeleteThis is a super post. I haven't had a chance to dive into the api's so this was very helpful. Your blog makes it look easy. I hope it's as easy as it looks.
Thanks!
The Google map API is easy because it inserts everything into the div for you. I am worried about the api's that return in xml or json format that you have to extract data out of.
ReplyDeleteThis is a great post. It's very helpful for probably all the groups :)
ReplyDeleteI meant to send you this eariler in the semester, but thanks, your post really helped me out.
ReplyDelete