Developers
Developers
SenFlote Maps hosts vector tiles, styles and a places API for Senegal and The Gambia. Public read is live: 9,960 places in 14 categories. The service is still a preview. Machine contract: openapi.json (OpenAPI 3.1).
1. Hosted styles (no key)
The simplest way: give MapLibre a style URL. No key, no SDK.
new maplibregl.Map({
container: 'map',
style: 'https://maps.senflote.com/v1/styles/calm/light.json',
center: [-16.5073, 16.0231],
zoom: 12,
})
| Resource | URL | Cache |
|---|---|---|
| Style (alias) | /v1/styles/<id>/<theme>.json | 300 s |
| Current version | /v1/current.json | 300 s |
| Archive (Range) | /v1/releases/<date>/senegal.pmtiles | immutable |
| Glyphs / sprites | /v1/assets/<ref8>/… | immutable |
1b. Leaflet: light, no WebGL
For a lightweight site or devices without WebGL, Leaflet draws the same vector archive
on a 2D canvas with protomaps-leaflet. The download is about 84 kB gzipped
(Leaflet 42, protomaps-leaflet 38, CSS 4), against about 298 kB for MapLibre. No key.
Full example.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css">
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.js"></script>
<script src="https://cdn.jsdelivr.net/npm/protomaps-leaflet@5.1.0/dist/protomaps-leaflet.js"></script>
<script>
const map = L.map('map').setView([16.0231, -16.5073], 12)
protomapsL.leafletLayer({
url: 'https://maps.senflote.com/v1/releases/2026-10-20/senegal.pmtiles',
flavor: 'light', // or 'dark'
lang: 'fr',
attribution: '© OpenStreetMap contributors · Landcover © ESA WorldCover · <a href="https://maps.senflote.com/credits/">SenFlote</a>',
}).addTo(map)
</script>
- What you gain: a much smaller download and no dependency on WebGL, so it works on modest devices.
- What you do not gain: smoother animation. On a recent device MapLibre (WebGL, GPU-accelerated) is still softer when zooming and panning.
- A different look: there is no style JSON here.
protomaps-leafletapplies its own themes (flavor:lightordark) and paints labels with the system font; the result is therefore not identical to the hostedcalmstyle of section 1. - No
/z/x/ytile URLs: the archive is read withRangerequests directly onsenegal.pmtiles(open CORS). The current version is in/v1/current.json; replace the date in the URL accordingly. - Data goes up to zoom 15 (beyond that, vector overzoom). The attribution in section 4 remains mandatory.
2. Public read API (no key)
Reading public, published places. Same origin; no CORS in v1 (use the same origin
or a server). Each place exposes exactly
public_id, name, category_key, lat, lng, license, attributes, verified
(attributes: an object of allowed keys such as wifi or
opening_hours, never contact details; verified: confirmed on site by a
reviewer). Filters: has=wifi,card and verified=1. Public read is live.
Contributions are a member flow, not a token API: a signed-in member posts a proposal with the
session cookie, and anonymous calls are refused.
curl -s 'https://maps.senflote.com/v1/public/places?q=cath&limit=5'
curl -s 'https://maps.senflote.com/v1/public/places/nearby?lat=16.0231&lng=-16.5073&radius=900'
curl -s 'https://maps.senflote.com/v1/public/geocode?q=sandaga&lang=en'
/v1/public/geocode resolves an address or landmark the registry does not hold
(Nominatim, server-side, cached for seven days, rate-limited per IP). It is meant to complete a
search that found nothing, not to replace a general-purpose geocoder.
3. Partner API (authenticated)
Server to server, with a bearer token issued by the operator. The calling application comes from the token, never from the request body.
Partner access: request it from the operator; there is no self-service portal.
Tokens are read-only by default, shown once, expire after 90 days, and are
limited to 300 requests/minute per token on top of the per-address nginx limit.
A 429 carries Retry-After: back off before retrying. Never put a token
in browser code; use a server-side proxy. Request access at
contact@senflote.com.
| Capability | Endpoints |
|---|---|
places:read | GET /v1/places, /v1/places/nearby, /v1/places/{publicId}, /v1/categories |
places:write | POST /v1/places, PATCH /v1/places/{publicId} |
Optional headers: X-Scope (the client's scope) and X-Subject
(an opaque per-user subject). Limits: radius ≤ 5000 m, limit ≤ 50.
An invisible place returns 404, never 403.
Response: the envelope { success, data, error, meta }. Error codes:
unauthenticated (401), forbidden (403), not_found (404),
validation_failed (422), possible_duplicate / already_imported (409),
rate_limited (429).
4. Attribution
Basemap: OpenStreetMap + ESA WorldCover. Places carry a licence per record (ODbL). Keep the style's attribution and link to the credits page. Do not credit Protomaps for the tiles.
Not available today
Batch geocoding, route matrices and alternative routes, offline packages, and programmatic access to accounts, contributions or claims are not part of the developer surface: contributions are a signed-in member flow, not a token API. Do not integrate these features before they appear here. The service is a preview: the public endpoints work, but their contract can still change.