Dynamic Google maps
- Fully customizable
- Interactive maps
This is the more advanced way of building maps, and it requires a little bit of technical knowledge (especially if you want to build more complex maps), however in return you get a lot more flexibility, customization and most of all maps that can be interactive and dynamically updated if need be.
A good place to start is the tutorial available from Google.
The sensor parameter like in the static maps should only be true if your website visitors are using a GPS enabled device (e.g. building a website for mobile phone users). Next make sure you have a div in you html code ready to receive the map image.
<div id="map_canvas" style="width: 300px; height: 300px"></div>
The width and height styles do not have to be defined inline, however the div needs to have it's dimensions defined for the map to work.
Worth noting is that the parameters for the map are similar to the parameters used by the static maps API.
Lastly you need to actually initialize the map once the page is finished loading. A simple way of doing tht is to call the initialize() function in the body tag:
Or alternativelly if you are already using jQuery on your website:
The full Google Maps API documentation can be found here.