Yangon data,
one clean API.
Geocoding, points of interest, directions, raster tiles, and ready-to-use map styles for Yangon — all built on OpenStreetMap and free to use from any website, app, or backend.
https://map.fortunemm.com/api/v1Check statusGeocode
Curated landmarks + OSM search
Places
Categorized POIs by bbox or radius
Directions
Driving, walking, cycling + steps
Tiles
XYZ tiles and MapLibre styles
Quick start
Every response is JSON and every endpoint is CORS-enabled, so it works straight from the browser.
import maplibregl from "maplibre-gl";
const map = new maplibregl.Map({
container: "map",
style: "https://map.fortunemm.com/api/v1/styles/standard",
center: [96.161, 16.795],
zoom: 13
});curl "https://map.fortunemm.com/api/v1/geocode?q=Shwedagon&limit=3"Authentication & limits
Open by default
This deployment accepts anonymous requests at 60 requests / minute / IP. Set REQUIRE_API_KEY=true to lock it down.
API keys
Create keys with MAP_API_KEYS=key:Name:600. Send them as a bearer token, an X-API-Key header, or a ?key= parameter.
X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Rate limiting is in-process; put a shared limiter in front when you run more than one instance.curl "https://map.fortunemm.com/api/v1/places?lat=16.7991&lon=96.1494&radius=800&category=temple" \
-H "Authorization: Bearer YOUR_KEY"Offline mode
A single command downloads the Yangon vector tiles (z9–14), glyphs, and a 13,700-place POI index into public/offline. After that, the map and the API work without an internet connection.
npm run offline:prepare
# build-time flag: start on the local style
NEXT_PUBLIC_DEFAULT_BASEMAP=offline npm run build
npm startLocal map assets
GET /api/v1/styles/offline returns a MapLibre style that points at /offline/tiles/{z}/{x}/{y}.pbf and local glyphs. The style is CORS-enabled, so any other project can point MapLibre at it.
Local data queries
Add offline=1 to /geocode, /reverse, and /places to skip upstream services and answer from the pack. /health reports pack size and availability.
./scripts/build-osrm.sh, start docker compose --profile routing up -d, then set OSRM_URL_DRIVING, OSRM_URL_WALKING, and OSRM_URL_CYCLING. Directions then work with no internet. Without a router they return 503 offline_no_routing. Satellite imagery always needs a connection. Pack data is © OpenStreetMap contributors, ODbL 1.0.Endpoints
Base URL https://map.fortunemm.com/api/v1. Click “Try it” to run a live request from your browser.
Search
/api/v1/geocodeSearchGeocode
Turn free text into places. Curated Yangon landmarks are matched instantly, then OpenStreetMap geocoders fill in the rest.
| Parameter | Type | Description |
|---|---|---|
qrequired | string | Free-text search, e.g. `Shwedagon`, `Sule Pagoda`, or `coffee`. |
limitoptional | integer | Maximum results. Default: 8. |
langoptional | en | my | Preferred label language. Falls back to English. Default: en. |
lat / lonoptional | number | Bias results towards this point. |
bboxoptional | number | Search window as `minLon,minLat,maxLon,maxLat`. Defaults to greater Yangon. |
offlineoptional | 1 | Set to `1` to search the local offline pack and skip upstream geocoders. |
curl 'https://map.fortunemm.com/api/v1/geocode?q=Shwedagon&limit=3'/api/v1/reverseSearchReverse geocode
Find the nearest address or place name for a coordinate.
| Parameter | Type | Description |
|---|---|---|
latrequired | number | Latitude (−90 to 90). |
lonrequired | number | Longitude (−180 to 180). |
langoptional | en | my | Preferred label language. Default: en. |
offlineoptional | 1 | Set to `1` to resolve from the local offline pack. |
curl 'https://map.fortunemm.com/api/v1/reverse?lat=16.79906&lon=96.14942'Places
/api/v1/placesPlacesPlaces in an area
Query OpenStreetMap points of interest by category inside a bounding box or around a radius. Great for “restaurants near me”.
| Parameter | Type | Description |
|---|---|---|
bboxoptional | string | `minLon,minLat,maxLon,maxLat`. Required unless `lat` and `lon` are set. |
latoptional | number | Centre latitude for a radius query. |
lonoptional | number | Centre longitude for a radius query. |
radiusoptional | number | Radius in metres when using `lat`/`lon` (max 5000). Default: 1000. |
categoryoptional | restaurant | hotel | hospital | bank | shopping | temple | transport | education | tourism | government | park | fuel | One of the Yangon Map categories. |
qoptional | string | Optional name filter, e.g. `coffee`. |
limitoptional | integer | Maximum places (1–1000). Default: 200. |
offlineoptional | 1 | Set to `1` to query the local offline pack and skip Overpass. |
curl 'https://map.fortunemm.com/api/v1/places?lat=16.7991&lon=96.1494&radius=1200&category=temple'/api/v1/places/{type}/{id}PlacesPlace details
Fetch full OpenStreetMap tags for a single element, such as opening hours, phone, and website.
| Parameter | Type | Description |
|---|---|---|
typerequired | node | way | relation | OSM element type. |
idrequired | integer | OSM element id. |
curl 'https://map.fortunemm.com/api/v1/places/way/117388457'Routing
/api/v1/directionsRoutingDirections
Driving, walking, and cycling routes with turn-by-turn steps and a GeoJSON geometry.
| Parameter | Type | Description |
|---|---|---|
fromrequired | string | Start as `lat,lon`. |
torequired | string | Destination as `lat,lon`. |
profileoptional | driving | walking | cycling | Travel mode. Default: driving. |
offlineoptional | 1 | Set to `1` to use a local `OSRM_URL`; returns `503 offline_no_routing` when no router is configured. |
curl 'https://map.fortunemm.com/api/v1/directions?from=16.7991,96.1494&to=16.7744,96.1592&profile=driving'Tiles & styles
/api/v1/tiles/{provider}/{z}/{x}/{y}.pngTiles & stylesMap tiles
Drop-in XYZ tiles, compatible with Leaflet, MapLibre, OpenLayers, and any OSM-style tile URL. Cache-friendly and rate limited.
| Parameter | Type | Description |
|---|---|---|
providerrequired | osm | esri-imagery | self | Tile layer to fetch. |
zrequired | integer | Zoom level (0–20). |
xrequired | integer | Tile column. |
yrequired | integer | Tile row, optionally with `.png`. |
curl -o tile.png 'https://map.fortunemm.com/api/v1/tiles/osm/14/12905/7590.png'/api/v1/styles/{id}Tiles & stylesMap style
A ready-to-use MapLibre style document. Raster styles point their tiles at this API.
| Parameter | Type | Description |
|---|---|---|
idrequired | standard | light | dark | satellite | osm | Base map id. |
curl 'https://map.fortunemm.com/api/v1/styles/standard'Meta
/api/v1/healthMetaHealth
Service status, API version, cache stats, and whether API keys are required.
curl 'https://map.fortunemm.com/api/v1/health'OpenStreetMap-compatible API
The endpoints below mirror the shape of the OSM ecosystem APIs. If an app already talks to Nominatim, OSRM, Photon, or the OSM tile server, change only its base URL to https://map.fortunemm.com and it keeps working — no query or response changes.
nominatim.openstreetmap.org/search/searchNominatim search. Nominatim JSON output: `place_id`, `osm_type`, `osm_id`, `lat`/`lon` as strings, `display_name`, `boundingbox`, and `address`. Supports `format=json|jsonv2|geocodejson`, `limit`, `viewbox`, `bounded`, `countrycodes`, `addressdetails`, `extratags`, `namedetails`, and `accept-language`. The legacy `/search.php` path works too.
nominatim.openstreetmap.org/reverse/reverseNominatim reverse. Reverse geocoding with Nominatim's single-object shape. Accepts `lat`, `lon`, `format`, `zoom`, and `accept-language`. The legacy `/reverse.php` path works too.
nominatim.openstreetmap.org/status/statusNominatim status. Returns `{"status":0,"message":"OK"}` plus deployment details (offline pack, routing mode).
router.project-osrm.org/route/v1/…/route/v1/{profile}/{lon,lat;lon,lat}OSRM route. OSRM route shape: `code`, `routes[].geometry`, `legs[].steps`, `waypoints[]`. Supports `overview`, `geometries=polyline|polyline6|geojson`, and `steps=true`. Profiles: driving, walking, cycling.
router.project-osrm.org/nearest/v1/…/nearest/v1/{profile}/{lon,lat}OSRM nearest. Snaps a coordinate to the closest known Yangon place and returns an OSRM `waypoints` array.
photon.komoot.io/api/api?q=Photon search. Photon GeoJSON output: `FeatureCollection` with `osm_key`, `osm_value`, `osm_type` (N/W/R), `extent`, and `countrycode`. Supports `limit`, `lat`/`lon` bias, `bbox`, and `osm_tag`.
tile.openstreetmap.org/{z}/{x}/{y}.png/{z}/{x}/{y}.pngRaster tiles. Same XYZ raster tile path, so Leaflet and OpenLayers apps keep working. Also available at `/tiles/{z}/{x}/{y}.png`. Set `COMPAT_TILE_PROVIDER=self` with `SELF_HOSTED_TILE_URL` to serve your own tiles.
/api/interpreter), the OSM editing API (api.openstreetmap.org/api/0.6/*), and XML/HTML output. Coverage is Yangon only, so results outside greater Yangon are filtered out.// Nominatim → this host
const NOMINATIM = "https://map.fortunemm.com";
await fetch(`${NOMINATIM}/search?q=Shwedagon&format=json&limit=5`).then((r) => r.json());
await fetch(`${NOMINATIM}/reverse?lat=16.7991&lon=96.1494&format=json`).then((r) => r.json());
// OSRM → this host
const OSRM = "https://map.fortunemm.com";
await fetch(`${OSRM}/route/v1/driving/96.15917,16.77439;96.14942,16.79906?overview=full&geometries=geojson`);
// Photon → this host
const PHOTON = "https://map.fortunemm.com";
await fetch(`${PHOTON}/api?q=Shwedagon&limit=5`).then((r) => r.json());
// OSM raster tiles → this host
const TILES = "https://map.fortunemm.com/{z}/{x}/{y}.png";# quick checks
curl "https://map.fortunemm.com/search?q=Sule&format=json&limit=2"
curl "https://map.fortunemm.com/reverse?lat=16.7991&lon=96.1494&format=json"
curl "https://map.fortunemm.com/route/v1/driving/96.15917,16.77439;96.14942,16.79906?overview=false"
curl "https://map.fortunemm.com/status"Embed a map
Drop a Yangon map into any page with one script tag. Options: lat, lon, z, style, marker, and label.
<div id="yangon-map" style="height: 420px"></div>
<script src="https://map.fortunemm.com/embed.js"></script>
<script>
YangonMap.embed("#yangon-map", {
lat: 16.7991,
lon: 96.1494,
z: 15,
style: "standard",
marker: "16.7991,96.1494",
label: "Shwedagon Pagoda"
});
</script>Prefer a link? Open the embeddable preview.
Data, attribution & self-hosting
Map data and places come from OpenStreetMap and are available under the Open Database License (ODbL 1.0). You must credit “© OpenStreetMap contributors” and keep derived data open.
The public tile endpoint is rate limited and meant for development. For production traffic, run your own tile server with the included docker-compose.yml and point SELF_HOSTED_TILE_URL at it, or build Yangon vector tiles with Planetiler.
Frontend: Next.js, MapLibre GL JS, Tailwind CSS. Routing: OSRM. Geocoding: Photon with Nominatim fallback. Places: Overpass API.