CargoCanvas / Examples / Markers, popups and tooltips

Markers, popups and tooltips

Landmarks across Curitiba. Click a marker for its popup; hover for its tooltip. One popup is built from a real DOM element rather than a string.

What to notice

Only one popup at a time. Opening a popup closes the previous one by default. Pass autoClose: false and closeOnClick: false in the popup options if you want several open at once.
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, Marker, Popup} from 'cargocanvas';