TopoExport logo
Developer docs

Migrate from another provider

Prompts for coding assistants that move a project from Mapbox, MapTiler, Stadia Maps or Google Maps Platform to the TopoExport APIs, where an equivalent exists.

Each prompt below asks a coding assistant (Claude Code, Cursor, Copilot…) to move the parts of your project that use one provider to the TopoExport APIs. It is written to be conservative:

  • the assistant first lists every use of the provider in your code and shows it to you;
  • it replaces only the calls listed as equivalent, and leaves everything else in place with a TODO(topoexport-migration) comment;
  • the key goes into an environment variable, and the required attribution stays visible;
  • it reports the differences in behaviour (address guard, credits, rate limits, response format) and proposes tests;
  • it removes no package, key or account: you decide once the migration is verified.

Read a prompt before using it, then paste it at the root of your project.

From Mapbox

Vector basemap stylesGeocoding API (v5, v6)Search Box API

8 equivalences, 5 kinds of usage left as is and reported.

From MapTiler

Vector basemap stylesGeocoding API

5 equivalences, 3 kinds of usage left as is and reported.

From Stadia Maps

Vector basemap stylesGeocoding API v1 (Pelias)Geocoding v2 autocomplete and place details

5 equivalences, 4 kinds of usage left as is and reported.

From Google Maps Platform

Places AutocompletePlace DetailsGeocoding API

5 equivalences, 4 kinds of usage left as is and reported.

What has an equivalent

NeedTopoExport
Vector basemap style for MapLibre GL JS or Mapbox GL JS/v1/styles/osm-world/{flavor}.json, see Map tiles
Address and place autocomplete/v1/geocode/autocomplete, coordinates included in each suggestion
Forward geocoding/v1/geocode/search, /v1/geocode/structured
Reverse geocoding/v1/geocode/reverse
Details of a result by identifier/v1/geocode/place?ids= with the result's gid

What has no equivalent

Routing and directions, isochrones and matrices, satellite imagery, raster basemap tiles, static map images, Street View, place photos, reviews and opening hours, and the providers' ready-made search widgets. The prompts leave these untouched and list them in their report.

Differences to plan for

  • Map schema. The TopoExport basemap uses the Protomaps v4 schema. Layers you added on top of a Mapbox Streets or OpenMapTiles basemap reference other source-layer names and must be rewritten by hand.
  • Geocoding format. Responses are Pelias GeoJSON: [lon, lat] coordinates, properties.label for display, properties.gid as identifier. Identifiers from another provider cannot be converted.
  • Address guard. Autocomplete searches the address layer from 6 characters, or as soon as the text contains a digit.
  • Credits and limits. See Plans and credits and Rate limits.