Skip to content
Last updated

The Digime Styles API serves map style documents used to render vector tiles in libraries like Mapbox GL JS and MapLibre GL JS.

A style is a JSON document that defines the visual appearance of a map: which sources to draw from, the layers to render, and how those layers are painted (colors, fonts, icons, and so on).

Retrieve a style

GET : https://dplace-api.themap.world/basemap/styles/{style_name}.json?apikey={YOUR_API_KEY}

Required parametersTypeDescription
style_namestringSpecifies the name of the style. See Available styles below.
apikeystringA valid Digime API key passed as a query parameter.

Available styles

Style nameDescription
dgm_lightDGM Light — the default light-themed basemap style.

More styles will be added in the future.

Example request: Retrieve a style

$ curl "https://dplace-api.themap.world/basemap/styles/dgm_light.json?apikey=YOUR_API_KEY"

Response: Retrieve a style

The response is a JSON document, following the MapLibre Style Specification, that can be passed directly to a compatible map rendering library, for example:

map = new maplibregl.Map({
  container: "map",
  style: "https://dplace-api.themap.world/basemap/styles/dgm_light.json?apikey=YOUR_API_KEY",
  center: [106.700981, 10.775848],
  zoom: 12,
});

Styles API errors

Response body messageHTTP status codeDescription
Not Authorized - No Token401No API key was used in the query.
Not Authorized - Invalid Token401Check the API key you used in the query.
Forbidden403There may be an issue with your account, or the API key has restrictions.
Style {style_name} does not exist404Check the name of the style you used in the query.

Styles API restrictions and limits

  • The default rate limit for the Digime Styles API endpoint depends on your current pricing plan. If you require a higher rate limit, please contact our sales team.
  • If you exceed the rate limit, you will receive an HTTP 429 Too Many Requests response.
  • Responses from the Styles API set default Cache-Control headers to ensure fast delivery across edge networks.

Styles API pricing

  • Billed by requests
  • See rates and discounts per style requests in our pricing page's Maps section.

Usage of the Styles API is measured in style requests. Details about the number of style requests included in the free tier and the cost per request beyond what is included in the free tier are available on the pricing page.