This section contains code examples for our JavaScript/TypeScript API.
We try to keep these code examples as simple and short as possible. Each code example is supposed to show you how to do one specific thing with our library. For example, a code example will tell you: “How to display isochrones in Google Maps”.
You can run these code examples locally simply by copying the entire content of a code example into a local file, and replacing __targomo_key_here__
with your own Targomo API key.
Maplibre-GL Places Layers
Places Layers API by BBox
Maplibre-GL Statistics Layers MVT
Basic Google Maps Isochrones
Google Maps Inverse Isochrones
Google Maps Isochrones Without Client Library
Isochrone Polygons vs Radius
Leaflet Customize Bike Speed
Leaflet GeoJSON Isochrones
Leaflet Inverse Isochrones
Leaflet Isochrone Colors Legend
Leaflet Isochrones Intersection Modes
Leaflet Isochrones Minimum Hole Size
Leaflet Isochrones with Custom Colors
Leaflet Isochrones with Traffic Congestion
Leaflet Time vs Distance Edge Weight
Leaflet Travel Mode Isochrones
Maplibre-GL Basic Isochrones
Maplibre-GL GeoJSON - Clipped
Maplibre-GL Inverse Isochrones
Maplibre-GL Isochrones with Polygon Source
Maplibre-GL Filter by Travel Time
GoogleMaps Tiled Multigraph
Maplibre-GL Tiled Multigraph
Visualize Multigraph with Deck.gl
Maplibre-GL Places Context
Maplibre-GL Tiled Places Context
Charting Reachable Statistics
Maplibre-GL Statistics Context
Location Scoring - Closest POI
Location Scoring - Reachable POI Count
Location Scoring - Statistics Criteria
Leaflet Routing API GeoJSON Results
Maplibre-GL Planning Multi-stop Scenarios