Skip to content

Commit 47d56fc

Browse files
author
Alfiya Tarasenko
committed
Add new code samples to the main ReadMe file
1 parent f25c022 commit 47d56fc

2 files changed

Lines changed: 56 additions & 1 deletion

File tree

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Welcome to the **Geoapify Location Platform Code Samples** repository! This proj
99
### JavaScript
1010

1111
* [Printable Route Directions](#javascript-printable-route-directions)
12+
* [Visualize Isochrones with Leaflet](#javascript-visualize-isochrones-with-leaflet)
13+
* [Visualize Isochrones with MapLibre GL](#javascript-visualize-isochrones-with-maplibre-gl)
14+
1215

1316
### Node.js
1417

@@ -54,6 +57,58 @@ Uses JavaScript and HTML to call the Geoapify Routing API for route data and the
5457

5558
---
5659

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.
75+
76+
**APIs used:**
77+
78+
* [Geoapify Isoline API](https://apidocs.geoapify.com/docs/isolines/)
79+
* [Geoapify Marker Icon API](https://www.geoapify.com/map-marker-icon-api/)
80+
81+
**Demo:**
82+
👉 [Leaflet Isochrone Demo – Live](https://geoapify.github.io/maps-api-code-samples/javascript/isolines-leaflet/demo_combined.html)
83+
84+
---
85+
86+
### 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.
101+
102+
**APIs used:**
103+
104+
* [Geoapify Isoline API](https://www.geoapify.com/isoline-api/)
105+
* [Geoapify Marker Icon API](https://www.geoapify.com/map-marker-icon-api/)
106+
107+
**Demo:**
108+
👉 [MapLibre Isochrone Demo – Live](https://geoapify.github.io/maps-api-code-samples/javascript/isolines-maplibre/demo_combined.html)
109+
110+
---
111+
57112
### Node.js: [Batch Geocoding with Rate Limiting](https://github.com/geoapify/maps-api-code-samples/tree/main/node/geocoding-with-RPS-limit-respect)
58113

59114
**What it does:**

javascript/isolines-leaflet/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This project is ideal for exploring service areas, delivery coverage, or accessi
2323
## Demo
2424

2525
You can try the sample live here:
26-
**[Open Demo on GitHub Pages](https://geoapify.github.io/maps-api-code-samples/javascript/isoline-leaflet/demo_combined.html)**
26+
**[Open Demo on GitHub Pages](https://geoapify.github.io/maps-api-code-samples/javascript/isolines-leaflet/demo_combined.html)**
2727

2828
> The `demo_combined.html` file is a self-contained version of the project with all CSS and JavaScript inlined for easy deployment on GitHub Pages.
2929

0 commit comments

Comments
 (0)