SWMAPS DocumentationAPI portal

Start here

Welcome to SW Maps

Your guide to embedding Philippine maps, calling map services, and taking map data into the field.

On this page

What you can build #

SW Maps serves a Philippine base map, place search, addresses, road routes, reachable areas, sea-depth data, coordinate grids, and downloadable offline map packs. The reference viewer brings these together with sectors, GPS and track export. All runtime map resources come from your configured maps host; the platform can operate on a disconnected internal network.

NeedUse
A map inside a websiteHosted ES modules or @sw-maps/core with MapLibre GL JS
Search or routes without a mapHTTP API or @sw-maps/core/services
An offline browser/PWA mapDownload a pack; store in OPFS; render its local resources
A native mobile mapMapLibre Native with the SW styles, packs and HTTP services
Shared military coordinates@sw-maps/mgrs, or the core /mgrs entry point
A ready-to-use toolOpen the reference viewer on the maps host

The API portal and the maps host may have different origins. This site documents the service; it does not proxy maps or host your application. Examples use https://maps.example/ for maps and https://portal.example/ for the portal. Replace these with the addresses supplied by platform staff.

Make your first request #

Prerequisites: a reachable maps host, its trusted HTTPS certificate, and an application API key with the maps scope. Ask platform staff to create an organization, application and appropriately scoped key. Customers currently do not have portal accounts.

bash
curl --fail-with-body   -H "X-API-Key: YOUR_API_KEY"   https://maps.example/maps/v1/releases/current

Expected result: JSON identifying the current mapdata-YYYYMMDD release, layers, styles, file checksums and prebuilt packs. A 401 means a missing key; 403 means invalid credentials or scope. For your first rendered map, follow Embed a web map.

Coordinates, units and coverage #

ItemConvention
Points and GeoJSON[longitude, latitude], WGS84 decimal degrees. Manila: [120.9842, 14.5995].
Bounding boxes[west, south, east, north]. Do not send latitude first.
Search/routing/depth coordinate inputsPhilippine service envelope: 114–128°E, 3–22°N; points outside it return 422.
Viewer bounds110–135°E, 0–25°N. Display bounds do not guarantee a road or a place at every point.
Distance and durationMetres and seconds in service responses; 1 nautical mile = 1852 metres.
TimeRoute depart parameter uses Philippine local time YYYY-MM-DDTHH:MM. Returned times use ISO timestamps.
Depthdepth_m is positive below sea level, null on land/no data; elevation_m is signed.

A wider rendered map or bathymetry footprint does not expand the service input envelope. OpenStreetMap coverage varies, especially for addresses and small roads. Routes are road-network calculations, not marine passage planning.

Choose your integration #

  • Hosted browser modules: fastest start, using locally hosted vendor libraries and CSS.
  • Bundled web or React: install the npm tarball from the maps host and pin dependencies in your lockfile.
  • PWA: bundle the application shell, download complete packs, and provide local font/sprite/style URLs alongside OPFS tile sources.
  • React Native/Android/iOS: choose a PMTiles-capable native SDK and follow the mobile guide; SW Maps does not ship a native renderer.
An offline map pack contains map resources and selected place names. Full Photon search, address reverse geocoding, Valhalla routing and isochrones still need the services. Offline tile depth sampling is possible in your app, with different semantics from the GEBCO depth endpoint.