收费的,static map请求1000次2美元

https://maps.googleapis.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&key=YOUR_API_KEY&signature=YOUR_SIGNATURE

Maps Static API

It returns an image (either GIF, PNG or JPGE) in response to an HTTP request via a URL. For each request, you can specify:

  • the location of the map
  • the size of the image
  • the zoom level,
  • the type of map,
  • the placement of optional markers at locations on the map
  • (additionally) label your markers using alphanumeric characters

A Maps Static API iamges is embedded with an tag’s src attribute

URL Parameters

URL form:

1
https://maps.googleapis.com/maps/api/staticmap?parameters

Note the url parameters should be properly URL-encoded

Location parameters

  • center (required if markers not present), it can be:
    • a comma-separated {latitude,longitude} pair (e.g. “40.714728,-73.998672”)
    • a string address (e.g. “city hall, new york, ny”) identifying a unique location on the face of the earth
  • zoom (required if markers not present)

Map parameters

  • size(required): {horizontal_value}x{vertical_value}
  • scale(optional), The default value is 1. Accepted values are 1 and 2
  • format(optional), PNG by default, can be GIF, JPEG
  • maptype(optional), roadmap / satellite / hybrid / terrain
  • language(optional)
  • region(optional)

Feature parameters

  • map_id (optional)
  • makers(optional)
  • path(optional)
  • visible(optional)
  • style (optional)

Key and signature parameters

  • key(required)
  • signature(recommended), a digital signature used to verify that any site generationg requests using you API key is authorized to do so. Requests without a digital signature might fail

demo

https://maps.googleapis.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&key=&signature=test

没有免费服务,static map请求1000次2美元