CargoCanvas / Examples / Vector layers

Vector layers

Circles, polygons, polylines and rectangles drawn over Curitiba, all rendered as SVG. Hover any shape to highlight it; click for a popup.

What to notice

Drawing thousands of paths? Every path here is an SVG element, which stops being viable in the low thousands. See the Canvas renderer example for the way out.
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, Circle, CircleMarker, Polygon, Polyline, Rectangle, LatLngBounds} from 'cargocanvas';