BeMap JS API
BeNomad's maps, routes and electric-mobility services in the browser, on MapLibre, Leaflet or OpenLayers.
One SDK · three map engines · maps, routing, geocoding & EV, by BeNomad
Release 2.0.4MapLibreLeafletOpenLayers
What's inside#
- Maps: MapLibre GL vector tiles, Leaflet & OpenLayers raster; 3D buildings, terrain, globe projection
- Geometry: markers (icons, labels, clustering, drag), polylines, polygons, circles, popups
- Routing: multi-stop, alternatives, route sheets, trace-route
- EV: smart routing, charging stations, reachable area, charging-time, vehicle catalogue
- Geocoding: forward, reverse, address autocomplete, isochrones / reachable zones
- BeNomad Tiles: JWT-secured PMTiles with configurable auth (cookie / header / query); 200-slice reads the browser HTTP-caches natively (Service Worker optional, only for classic 206-range); self-healing cache + timeout/retry gate; survives tileset rebuilds automatically (per-map
?v=version tokens + ETag guard, no blank maps, no cache clears) - One API, three engines: same
Context, same calls, just change the map class - Credential-less production mode: the
proxyoption keeps your BeMap login/password on your server; the browser holds nothing to steal
Add a map
The map pages' samples, one per engine: BeNomad Tiles on MapLibre, WMS on Leaflet and OpenLayers, each run against production as published.
<!-- The BeMap JS API and the engine it drives -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/maplibre-gl.css" integrity="sha256-qx5w1Z7EBGW65+cDDaLzzPKBM/1QLmK9WY7vut/XpzI=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/bemap-js-api.css" integrity="sha256-6JTuf+5yR2uKDbRMVCKVkicMghqX/fopHJUUH0a9IwE=" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/maplibre-gl.js" integrity="sha256-RamwepGJzlYFTGIKlHzPQeKR5YyV6bYVM7dAqqZe5cs=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/pmtiles.js" integrity="sha256-9c3A9bJWe6KCmo4QL39UNh8Ig9oxFaFuxcqQlz8sz2c=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/bemap-js-api.min.js" integrity="sha256-9nw1Dpfl6zDEakYlPDODJHrz9RvsqjZ+HttOFJNJMss=" crossorigin="anonymous"></script>
<div id="map" style="height: 480px"></div>
<script>
var ctx = new bemap.Context({
host: 'bemap.benomad.com', secure: true,
login: 'YOUR_ACCOUNT', password: 'YOUR_API_KEY', // for evaluation: in production, use the proxy option
tilesHost: 'mptiles-api.benomad.net'
});
var map = new bemap.MapLibreMap(ctx, 'map');
map.move(2.35, 48.85, 12); // longitude, latitude, zoom
</script><!-- The BeMap JS API and the engine it drives -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/leaflet.css" integrity="sha256-M3v8pcq9A7OYFbJwD+vis7ft9VkhxZzUn4jssyghIwM=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/bemap-js-api.css" integrity="sha256-6JTuf+5yR2uKDbRMVCKVkicMghqX/fopHJUUH0a9IwE=" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/bemap-js-api.min.js" integrity="sha256-9nw1Dpfl6zDEakYlPDODJHrz9RvsqjZ+HttOFJNJMss=" crossorigin="anonymous"></script>
<div id="map" style="height: 480px"></div>
<script>
var ctx = new bemap.Context({
host: 'bemap.benomad.com', secure: true,
login: 'YOUR_ACCOUNT', password: 'YOUR_API_KEY', // for evaluation: in production, use the proxy option
// Leaflet needs the geoserver named: one of your account's that draws maps
// (new bemap.AclService(ctx).getCurrentUserDetails() lists your account's).
geoserver: 'YOUR_GEOSERVER'
});
new bemap.LeafletMap(ctx, 'map').defaultLayers().move(2.35, 48.85, 12);
</script><!-- The BeMap JS API and the engine it drives -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/ol.css" integrity="sha256-q8iv1yzBC9KcwUP0Q7rkpoBL08s/smLmtqa8bJJOo08=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/bemap-js-api.css" integrity="sha256-6JTuf+5yR2uKDbRMVCKVkicMghqX/fopHJUUH0a9IwE=" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/ol.js" integrity="sha256-Dcmd21j13KXnaK0AJdTIZCvP9hb46nhNtYAdlq3f63o=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist/bemap-js-api.min.js" integrity="sha256-9nw1Dpfl6zDEakYlPDODJHrz9RvsqjZ+HttOFJNJMss=" crossorigin="anonymous"></script>
<div id="map" style="height: 480px"></div>
<script>
var ctx = new bemap.Context({
host: 'bemap.benomad.com', secure: true,
login: 'YOUR_ACCOUNT', password: 'YOUR_API_KEY' // for evaluation: in production, use the proxy option
});
new bemap.OlMap(ctx, 'map').defaultLayers().move(2.35, 48.85, 12);
</script>Each loads the release from https://cdn.jsdelivr.net/gh/BeNomadSAS/bemap-js-api@2.0.4/dist, pinned by this site. You can also copy the release's dist/ folder into your application.
Across the products
- Routing: Route calculation: Routing, Isochrone · Trace route: TraceRoute
- Electric mobility: EV smart routing: EV Smart Routing · EV reachable area: EV Reachable Area · Charging stations: Charging Stations · Charging time and cost: Charging Time · Electric vehicle database: EV Vehicles
- Search: Geocoding: Geocoder, Autocomplete, GeoAutocomplete · Reverse geocoding: Reverse Geocoder · Near POI: Near POI
- Maps: BeNomad Tiles: BeNomad Tiles (live demo), 3D & Globe, Style: custom JSON, Style picker (server styles) · WMS: Basic map, Clustering (Leaflet, with shapes)
Examples and reference
- Live demo dashboard : every feature, runnable, with the code to copy
- Examples gallery : one page per feature, on each engine
- API reference : every class and method, generated from the library
- The source on GitHub : the library, its changelog and its install guide
Flutter
The same services from a Dart and Flutter application: ask your BeNomad contact.
Third-party software
The BeMap JS API 2.0.4 draws its maps with these libraries, which this site serves with it, each under its own licence: