Address format for Google Maps

I'm trying to do something that parses text for possible addresses and turns them into links to Google Maps. Is there a link to the most common address format that Google Maps will accept as a request? It seems like they would like to make it public, but I can not find anything in the documents.

+6
regex google-maps
source share
1 answer

You should look at the Google Static Maps API .

Addresses

Most people do not speak in latitudes and longitudes; they indicate locations using addresses. The process of turning an address into a geographic point is known as geocoding, and the Static Maps service can geocode for you if you provide valid addresses.

In any parameter where you can specify latitude / longitude, you can specify a string indicating the address. Google will geocode the address and provide the static map service with a latitude / longitude value that will be used when placing markers or indicating locations. The string must be a URL escape code , so addresses such as "City Hall, New York, NY" must be converted to "City + Hall, New" + York, New York, for example.

Note that addresses can reflect either exact locations, such as street addresses, polylines, such as named routes, or polygon areas, such as cities, countries, or national parks. For multilinear and polygonal results, the static map server will use the center point of the line / area as the center of the address. If you have doubts about how the address can be geocoded, you can check the address using this geocoding utility .

The following example creates a static map for Berkeley, CA:

http://maps.google.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&sensor=false 

Resources:

+5
source share

All Articles