You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Visualize Isochrones with Leaflet](#javascript-visualize-isochrones-with-leaflet)
13
+
*[Visualize Isochrones with MapLibre GL](#javascript-visualize-isochrones-with-maplibre-gl)
14
+
12
15
13
16
### Node.js
14
17
@@ -54,6 +57,58 @@ Uses JavaScript and HTML to call the Geoapify Routing API for route data and the
54
57
55
58
---
56
59
60
+
### JavaScript: [Visualize Isochrones with Leaflet](https://github.com/geoapify/maps-api-code-samples/tree/main/javascript/isolines-leaflet)
61
+
62
+
**What it does:**
63
+
Calculates and displays isochrone (travel-time) and isodistance (travel-distance) polygons on an interactive Leaflet map.
64
+
65
+
**How it works:**
66
+
When a user clicks on the map, a form appears to select travel mode, isoline type, and range. The app requests isoline polygons from the Geoapify Isoline API, adds them to the map as GeoJSON layers, and places a custom marker at the origin.
67
+
68
+
**Key features:**
69
+
70
+
* Easy-to-use Leaflet-based interface.
71
+
* Support for multiple isolines with unique colors.
72
+
* Informative icons via the Geoapify Marker API.
73
+
* Real-time isoline rendering with automatic zoom.
74
+
* Optional one-file build with inlined JS/CSS for easy deployment.
### JavaScript: [Visualize Isochrones with MapLibre GL](https://github.com/geoapify/maps-api-code-samples/tree/main/javascript/isolines-maplibre)
87
+
88
+
**What it does:**
89
+
Displays isochrone (time-based) and isodistance (distance-based) isolines on a MapLibre GL map using user-selected travel modes and values.
90
+
91
+
**How it works:**
92
+
Users click on the map to choose a location, select parameters in a form, and the app requests an isoline from the Geoapify API. The result is styled and rendered as a colored polygon, with a custom marker showing the travel mode and range.
93
+
94
+
**Key features:**
95
+
96
+
* Interactive UI with travel mode, type, and range selection.
97
+
* Multiple isolines with different colors.
98
+
* Custom markers using the Geoapify Marker API.
99
+
* Fully vector-based rendering via GeoJSON layers.
100
+
* Self-contained build option for GitHub Pages deployment.
0 commit comments