Skip to content

Examples

Layers & Data

Add an external vector tile source to a Maptoolkit map and apply custom styles to its layers.
Add a Vector Tile Source
Add an external vector tile source to a Maptoolkit map and apply custom styles to its layers.
Add an external raster tile source and display it as a layer on a Maptoolkit map.
Add a Raster Tile Source
Add an external raster tile source and display it as a layer on a Maptoolkit map.
Connect a WMS (Web Map Service) endpoint as a raster source on a Maptoolkit map.
Add a WMS Source
Connect a WMS (Web Map Service) endpoint as a raster source on a Maptoolkit map.
Use an HTML canvas element as a live animated map source to overlay dynamic graphics on a Maptoolkit map.
Add a Canvas Source
Use an HTML canvas element as a live animated map source to overlay dynamic graphics on a Maptoolkit map.
Add a GeoJSON point source to a Maptoolkit map and render the points as a styled circle layer.
Draw GeoJSON Points
Add a GeoJSON point source to a Maptoolkit map and render the points as a styled circle layer.
Draw a geographic circle at a radius in meters on a Maptoolkit map using a GeoJSON polygon approximation.
Draw a Circle
Draw a geographic circle at a radius in meters on a Maptoolkit map using a GeoJSON polygon approximation.
Render points, lines, and polygons from a single GeoJSON source using multiple Maptoolkit layer types.
Add Multiple Geometries from One GeoJSON Source
Render points, lines, and polygons from a single GeoJSON source using multiple Maptoolkit layer types.
Fetch live data from an external API on an interval and update a Maptoolkit map source in real time.
Add Live Realtime Data
Fetch live data from an external API on an interval and update a Maptoolkit map source in real time.
Update a GeoJSON feature's coordinates in real time on a Maptoolkit map by calling setData on the source.
Update a Feature in Realtime
Update a GeoJSON feature's coordinates in real time on a Maptoolkit map by calling setData on the source.
Animate a GeoJSON point moving in a circle on a Maptoolkit map using requestAnimationFrame and setData.
Animate a Point
Animate a GeoJSON point moving in a circle on a Maptoolkit map using requestAnimationFrame and setData.
Animate a growing line on a Maptoolkit map by progressively adding coordinates to a GeoJSON source.
Animate a Line
Animate a growing line on a Maptoolkit map by progressively adding coordinates to a GeoJSON source.
Animate a point icon moving along a fixed route on a Maptoolkit map using Turf.js for position interpolation.
Animate a Point Along a Route
Animate a point icon moving along a fixed route on a Maptoolkit map using Turf.js for position interpolation.
Cycle through a sequence of images on a Maptoolkit raster source to create a frame-by-frame map animation.
Animate a Series of Images
Cycle through a sequence of images on a Maptoolkit raster source to create a frame-by-frame map animation.
Visualize point density on a Maptoolkit map using a heatmap layer driven by data-driven style expressions.
Create a Heatmap Layer
Visualize point density on a Maptoolkit map using a heatmap layer driven by data-driven style expressions.
Group nearby point features into clusters on a Maptoolkit map and style them by cluster size using GeoJSON clustering.
Create and Style Clusters
Group nearby point features into clusters on a Maptoolkit map and style them by cluster size using GeoJSON clustering.
Filter GeoJSON features on a Maptoolkit map by a time value using an HTML range slider and a filter expression.
Create a Time Slider
Filter GeoJSON features on a Maptoolkit map by a time value using an HTML range slider and a filter expression.
Overlay a video file at geographic bounds on a Maptoolkit map, with click-to-pause support.
Add a Video
Overlay a video file at geographic bounds on a Maptoolkit map, with click-to-pause support.
Render a fully static, non-interactive Maptoolkit map by disabling all user input handlers.
Display a Non-Interactive Map
Render a fully static, non-interactive Maptoolkit map by disabling all user input handlers.
Measure Maptoolkit map load time, time to idle, and frames per second using built-in performance events.
Display Map Performance Metrics
Measure Maptoolkit map load time, time to idle, and frames per second using built-in performance events.