CargoCanvas / Examples / Canvas renderer

Canvas renderer

5,000 delivery points scattered over Curitiba. Switch between the SVG and Canvas renderers and compare how long each takes to draw — and how each feels to pan.

What to notice

Still too slow? At tens of thousands of features the renderer stops being the bottleneck and the data volume becomes the problem. Thin the data by zoom level, cluster it, or serve it as vector tiles so only the visible extent is loaded.
Why the UMD build? Loading it as a classic script is what lets this page work when opened straight from disk. In an application with a bundler, install the package and import the classes instead — everything after that line is identical:
import {CargoMap, TileLayer, CircleMarker, LayerGroup, Canvas, SVG} from 'cargocanvas';