Embed Google Maps Image and Street View
Google Maps APIs provide easy ways to embed maps images. The following are static map image, satellite image and street view image of “Lincoln Memorial”.
Static Maps API supports map images with custom styles, markers, satellite maps. The following is the HTML code for the static map image above.
<img src="http://maps.googleapis.com/maps/api/staticmap?center=38.8893,-77.0501118&markers=38.8893,-77.0501118&zoom=15&size=200x200&sensor=false">
Static map images use the following URL parameters:
centerdefines the center of the map by a pair of latitude and longitude or a string address. For example,center=38.8893,-77.0501118.zoomdefines the zoom level between 0 and 21. For example,zoom=15.sizedefines the width and height. For example,size=200x200.markers(optional) defines the markers attached to the map; each marker is separated by (|). For example,markers=38.8893,-77.0501118.
Another parameter maptype allows different types of maps.
roadmap(default) specifies a standard roadmap.satellitespecifies a satellite image. For example,maptype=satellite.terrainspecifies a terrain map.
Street View Image API supports embedding static Street View imagery. The following is the HTML code for the street view image above.
<img src="http://maps.googleapis.com/maps/api/streetview?size=200x200&location=38.8893,-77.050111&heading=250&sensor=false">
Street view images use the following URL parameters:
locationspecifies the center by a pair of latitude and longitude or a string address. For example,location=38.8893,-77.0501118.sizedefines the width and height. For example,size=200x200.headingdefines the heading direction from 0 to 360 (North 0, East 90, South 180).
The detailed documents can found at Static Maps API and Street View Image API