Version 1 · OpenStreetMap data · ODbL

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 status

Geocode

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.

maplibre
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
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.

Responses include 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.
authenticated request
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.

build and start on the local pack
npm run offline:prepare

# build-time flag: start on the local style
NEXT_PUBLIC_DEFAULT_BASEMAP=offline npm run build
npm start

Local 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.

Routing can be self-hosted too: run ./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

GET/api/v1/geocodeSearch

Geocode

Turn free text into places. Curated Yangon landmarks are matched instantly, then OpenStreetMap geocoders fill in the rest.

ParameterTypeDescription
qrequiredstringFree-text search, e.g. `Shwedagon`, `Sule Pagoda`, or `coffee`.
limitoptionalintegerMaximum results. Default: 8.
langoptionalen | myPreferred label language. Falls back to English. Default: en.
lat / lonoptionalnumberBias results towards this point.
bboxoptionalnumberSearch window as `minLon,minLat,maxLon,maxLat`. Defaults to greater Yangon.
offlineoptional1Set to `1` to search the local offline pack and skip upstream geocoders.
curl
curl 'https://map.fortunemm.com/api/v1/geocode?q=Shwedagon&limit=3'
GET/api/v1/reverseSearch

Reverse geocode

Find the nearest address or place name for a coordinate.

ParameterTypeDescription
latrequirednumberLatitude (−90 to 90).
lonrequirednumberLongitude (−180 to 180).
langoptionalen | myPreferred label language. Default: en.
offlineoptional1Set to `1` to resolve from the local offline pack.
curl
curl 'https://map.fortunemm.com/api/v1/reverse?lat=16.79906&lon=96.14942'

Places

GET/api/v1/placesPlaces

Places in an area

Query OpenStreetMap points of interest by category inside a bounding box or around a radius. Great for “restaurants near me”.

ParameterTypeDescription
bboxoptionalstring`minLon,minLat,maxLon,maxLat`. Required unless `lat` and `lon` are set.
latoptionalnumberCentre latitude for a radius query.
lonoptionalnumberCentre longitude for a radius query.
radiusoptionalnumberRadius in metres when using `lat`/`lon` (max 5000). Default: 1000.
categoryoptionalrestaurant | hotel | hospital | bank | shopping | temple | transport | education | tourism | government | park | fuelOne of the Yangon Map categories.
qoptionalstringOptional name filter, e.g. `coffee`.
limitoptionalintegerMaximum places (1–1000). Default: 200.
offlineoptional1Set to `1` to query the local offline pack and skip Overpass.
curl
curl 'https://map.fortunemm.com/api/v1/places?lat=16.7991&lon=96.1494&radius=1200&category=temple'
GET/api/v1/places/{type}/{id}Places

Place details

Fetch full OpenStreetMap tags for a single element, such as opening hours, phone, and website.

ParameterTypeDescription
typerequirednode | way | relationOSM element type.
idrequiredintegerOSM element id.
curl
curl 'https://map.fortunemm.com/api/v1/places/way/117388457'

Routing

GET/api/v1/directionsRouting

Directions

Driving, walking, and cycling routes with turn-by-turn steps and a GeoJSON geometry.

ParameterTypeDescription
fromrequiredstringStart as `lat,lon`.
torequiredstringDestination as `lat,lon`.
profileoptionaldriving | walking | cyclingTravel mode. Default: driving.
offlineoptional1Set to `1` to use a local `OSRM_URL`; returns `503 offline_no_routing` when no router is configured.
curl
curl 'https://map.fortunemm.com/api/v1/directions?from=16.7991,96.1494&to=16.7744,96.1592&profile=driving'

Tiles & styles

GET/api/v1/tiles/{provider}/{z}/{x}/{y}.pngTiles & styles

Map tiles

Drop-in XYZ tiles, compatible with Leaflet, MapLibre, OpenLayers, and any OSM-style tile URL. Cache-friendly and rate limited.

ParameterTypeDescription
providerrequiredosm | esri-imagery | selfTile layer to fetch.
zrequiredintegerZoom level (0–20).
xrequiredintegerTile column.
yrequiredintegerTile row, optionally with `.png`.
curl
curl -o tile.png 'https://map.fortunemm.com/api/v1/tiles/osm/14/12905/7590.png'
GET/api/v1/styles/{id}Tiles & styles

Map style

A ready-to-use MapLibre style document. Raster styles point their tiles at this API.

ParameterTypeDescription
idrequiredstandard | light | dark | satellite | osmBase map id.
curl
curl 'https://map.fortunemm.com/api/v1/styles/standard'

Meta

GET/api/v1/healthMeta

Health

Service status, API version, cache stats, and whether API keys are required.

curl
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/search

Nominatim 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/reverse

Nominatim 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/status

Nominatim 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}.png

Raster 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.

Not implemented: Overpass QL (/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.
swap the base URL
// 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";
smoke test the compatibility layer
# 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.

html
<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.