Create a Maps Web Snapshot
Generates a map image with characteristics that you provide in the query parameters.
URL
GET https://snapshot.apple-mapkit.com/api/v1/snapshotQuery Parameters
| Name | Type | Description |
|---|---|---|
teamId Optional | string | Only use this parameter if you don’t provide a token parameter. Your Apple Developer Team ID. For more information, see Creating a Maps identifier and a private key. |
keyId Optional | string | Only use this parameter if you don’t provide a token parameter. Your MapKit JS Key ID. For more information, see Creating a Maps identifier and a private key. |
signature Optional | string | Only use this parameter if you don’t provide a token parameter. A Base64, URL-encoded signature that signs the request path and query parameters. The signature must be the last parameter in the request URL; otherwise, the request returns status code |
center Required | string | The center of the map. You can specify Provide coordinates as a string with the latitude and longitude separated by a comma, such as: If you specify A geocoded address is a valid value for the The string If you specify |
z Optional | float | The zoom level of the map. The Web Map Snapshot API ignores the |
spn Optional | string | A comma-separated coordinate span that indicates how much of the map Web Map Snapshots API displays around the map’s center. The latitude must be in the range of The Web Map Snapshot API ignores the |
size Optional | string | The size of the image in pixels. Specify the The width and height must be within the range of |
scale Optional | int32 | The pixel density of the image. |
t Optional | string | The map type. |
colorScheme Optional | string | The color scheme of the map. The |
poi Optional | boolean | A Boolean value that indicates whether to show points of interest on the map. To hide points of interest, set |
lang Optional | string | The language that Maps Web Snapshots API uses for labels on the map. Supported values are locale IDs, such as |
annotations Optional | [Annotation] | An array of annotations to display on the map, which you specify as JSON Annotation objects. Annotations layer on top of the map in the order you specify in the request. |
overlays Optional | [Overlay] | An array of overlays to display on the map, which you specify as an array of JSON Overlay objects. |
overlayStyles Optional | [OverlayStyle] | A JSON array of overlay styles. This object allows you to reuse style values on different overlays. |
imgs Optional | [Image] | An array of custom images to annotate the map, specified as an array of JSON Image objects. |
referer Optional | string | Only use this parameter if you don’t provide a token parameter. The |
expires Optional | int64 | Only use this parameter if you don’t provide a token parameter. The time in seconds from epoch at which the request expires. Expired requests fail with HTTP status code |
token Optional | string | A developer’s Maps token. For information on how to create a Maps token, see Creating a Maps token. |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: image/png | binary | The request was successful and the Maps Web Snapshots API returned a map image as |
| 400 | Bad Request Content-Type: application/json | The request is invalid. | |
| 401 | Unauthorized Content-Type: application/json | This request contains invalid authorization credentials. | |
| 413 | Request Entity Too Large Content-Type: application/json | The URL for this request exceeds the maximum number of characters allowed. | |
| 429 | Content-Type: application/json | You exceeded the rate limit for your API key. You need to wait and try the request again. | |
| 500 | Internal Server Error Content-Type: application/json | The request failed. This may be due to a temporary outage. Check the Apple Developer System Status Page for up-to-date information on the Web Map Snapshot API. |
Mentioned in
Discussion
Use the Snapshot URL query parameters to define characteristics of the map image such as dimensions, language, color scheme, and more.
You must sign every Snapshot URL request and include the signature as the final parameter. For details and example code, see Generating a URL and Signature to Create a Maps Web Snapshot.