Migrate from another provider
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
8 equivalences, 5 kinds of usage left as is and reported.
From MapTiler
5 equivalences, 3 kinds of usage left as is and reported.
From Stadia Maps
5 equivalences, 4 kinds of usage left as is and reported.
From Google Maps Platform
5 equivalences, 4 kinds of usage left as is and reported.
What has an equivalent
| Need | TopoExport |
|---|---|
| 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-layernames and must be rewritten by hand. - Geocoding format. Responses are Pelias GeoJSON:
[lon, lat]coordinates,properties.labelfor display,properties.gidas identifier. Identifiers from another provider cannot be converted. - Address guard. Autocomplete searches the
addresslayer from 6 characters, or as soon as the text contains a digit. - Credits and limits. See Plans and credits and Rate limits.