Table of contents
Google Curated Content
Download API definition:
This operation is a Technical Preview and is available for testing purposes only. Do not use in production.
POST https://dev-api.bentley.com/curated-content/google/map-tiles/2d

Retrieves information and credentials that allow you to access the tiled content data for visualization and analysis.

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with itwin-platform scope

Accept
Yes

Setting to application/vnd.bentley.return-full-session-info+json is recommended.

Request body

Access2DTilesRequest

Name
Type
Required?
Description
mapType
Yes
language
String
Yes

An IETF language tag that specifies the language used to display information on the tiles. For example, en-US specifies the English language as spoken in the United States.

region
String
Yes

A Common Locale Data Repository region identifier (two uppercase letters) that represents the physical location of the user. For example, US.

imageFormat
String
No
scale
No
highDpi
Boolean
No

Specifies whether to return high-resolution tiles. If the scale-factor is increased, highDpi is used to increase the size of the tile. Normally, increasing the scale factor enlarges the resulting tile into an image of the same size, which lowers quality. With highDpi, the resulting size is also increased, preserving quality. DPI stands for Dots per Inch, and High DPI means the tile renders using more dots per inch than normal. If true, then the number of pixels in each of the x and y dimensions is multiplied by the scale factor (that is , scaleFactor2x or scaleFactor4x). The coverage area of the tile remains unchanged. This parameter works only with scale values of scaleFactor2x or scaleFactor4x. It has no effect on scaleFactor1x scale tiles.

layerTypes
No
overlay
Boolean
No

A boolean value that specifies whether layerTypes should be rendered as a separate overlay, or combined with the base imagery. When true, the base map isn't displayed. If you haven't defined any layerTypes, then this value is ignored.

Example

json
{
    "mapType": "terrain",
    "language": "en-US",
    "region": "US",
    "imageFormat": "jpeg",
    "scale": "scaleFactor2x",
    "highDpi": true,
    "layerTypes": [
        "layerRoadmap"
    ]
}

Response 200 OK

OK

json
{
    "type": "IMAGERY",
    "viewportBaseUrl": "https://tile.googleapis.com/tile/v1/viewport",
    "tileBaseUrl": "https://tile.googleapis.com/v1/2dtiles",
    "accessToken": "ya29.c.c0ASRK0Gb9O...5I0c5-",
    "session": {
        "token": "AJV....HyTiZNQ",
        "expiry": "1747320703",
        "tileWidth": 256,
        "imageFormat": "png",
        "tileHeight": 256
    }
}

Response 400 Bad Request

The 400 (Bad Request) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax)

json
{
    "error": {
        "code": "InvalidGoogleCuratedContentRequest",
        "message": "Request body is invalid.",
        "details": [{
            "code": "InvalidRequestBody",
            "message": "Invalid request body.",
            "target": "mapType"
        }]
    }
}

Response 401 Unauthorized

This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 429 Too many requests

This response indicates that the client sent more requests than allowed by this API for the current tier of the client.

json
{
    "error": {
        "code": "RateLimitExceeded",
        "message": "The client sent more requests than allowed by this API for the current tier of the client."
    }
}

Response headers

Name
Description
retry-after

Number of seconds to wait until client is allowed to make more requests.

ContentType

The type of content.

Name
Type
Description
3DTILES
String
IMAGERY
String

Access2DTilesResponse

Name
Type
Description
viewportBaseUrl
String

The base url for the viewport requests. The viewport defines the size of the box that frames the world scene. This request also returns the attribution string that you must display on your map when you display roadmap and satellite tiles.

tileBaseUrl
String

The base url for the tileset requests.

accessToken
String

The token to be included with each tile request, using Bearer format. This token is different than the access token used throughout the rest of the REST API. It provides access to the content for approximately one hour. To continue using the content after the allotted time, simple re-request the endpoint for a new token.

SessionInformation

Name
Type
Description
token
String

A session token value that you must include in all of your Map Tiles API requests.

expiry
String

A string that contains the time (in seconds since the epoch) at which the token expires. A session token is valid for two weeks from its creation time, but this policy might change without notice.

tileWidth
Number

The width of the tiles measured in pixels.

tileHeight
Number

The height of the tiles measured in pixels.

imageFormat
String

The image format, which can be either png or jpeg.

Access2DTilesRequest

Name
Type
Description
mapType
language
String

An IETF language tag that specifies the language used to display information on the tiles. For example, en-US specifies the English language as spoken in the United States.

region
String

A Common Locale Data Repository region identifier (two uppercase letters) that represents the physical location of the user. For example, US.

imageFormat
String
scale
highDpi
Boolean

Specifies whether to return high-resolution tiles. If the scale-factor is increased, highDpi is used to increase the size of the tile. Normally, increasing the scale factor enlarges the resulting tile into an image of the same size, which lowers quality. With highDpi, the resulting size is also increased, preserving quality. DPI stands for Dots per Inch, and High DPI means the tile renders using more dots per inch than normal. If true, then the number of pixels in each of the x and y dimensions is multiplied by the scale factor (that is , scaleFactor2x or scaleFactor4x). The coverage area of the tile remains unchanged. This parameter works only with scale values of scaleFactor2x or scaleFactor4x. It has no effect on scaleFactor1x scale tiles.

layerTypes
overlay
Boolean

A boolean value that specifies whether layerTypes should be rendered as a separate overlay, or combined with the base imagery. When true, the base map isn't displayed. If you haven't defined any layerTypes, then this value is ignored.

MapType

The type of base map. roadmap is the standard Google Maps painted on map tiles. satellite is satellite imagery. terrain is Terrain imagery. When selecting terrain as the map type, you must also include the layerRoadmap layer type.

Name
Type
Description
roadmap
String
satellite
String
terrain
String

Scale

Scales-up the size of map elements (such as road labels), while retaining the tile size and coverage area of the default tile. Increasing the scale also reduces the number of labels on the map, which reduces clutter. The default scale is scaleFactor1x.

Name
Type
Description
scaleFactor1x
String
scaleFactor2x
String
scaleFactor4x
String

LayerTypes

An array of values that specifies the layer types added to the map.

DetailedError

Contains error information and an array of more specific errors.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target of the error.

details

Optional array of more specific errors.

Detailed Error Response

Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.

Name
Type
Description
error

Error Detailed information.

Error

Contains error information.

Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String, null

The target of the error.

Error Response

Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.

Name
Type
Description
error

Error information.

Was this page helpful?