Examples
Twelve examples. Each page has a .ts sibling you can copy into your own project.
To try the library without installing anything, open the playground: every demo there runs in the browser, from a real basemap and search to turn-by-turn and offline maps.
| # | Title | What it shows |
|---|---|---|
| 01 | Basic map | OSM basemap + marker + popup. |
| 02 | Camera | Bearing, pitch, flyTo, easeTo. |
| 03 | Vector tiles | Synthetic MVT through VectorTileMapLayer. |
| 04 | Style spec | setStyle + dynamic setPaintProperty. |
| 05 | Heatmap | 500 random points with an animated gradient. |
| 06 | Hillshade | Synthetic DEM + hillshade preview. |
| 07 | Clusters | 5,000 points in GeoJSONClusterSource. |
| 08 | Symbols | Labeled POIs with collision. |
| 09 | Geocoder | Search box wired to Nominatim. |
| 10 | Directions | Click two points, draw OSRM route. |
| 11 | Offline | Download a bbox, toggle the network. |
| 12 | Globe | Canvas2D orthographic projection preview. |