CargoCanvas / Examples

Examples

Each example below is a single, self-contained HTML file with nothing hidden in a build step. Open one, use View Source, and you have the whole thing — copy the file out of landing/examples/ and adjust the two paths in its <head>. All of them are centred on Curitiba, PR.

They run straight from the filesystem: build dist/ once, then just double-click a file. No server needed.

Running these

Why these pages use the UMD build. Opening a file from disk gives it a file:// URL, and browsers refuse to load ES modules from those — module scripts are fetched with CORS, which file:// cannot satisfy. A classic <script src> has no such restriction, so these pages load the UMD bundle and read the classes off the CargoCanvas global. In a real application with a bundler you would import them instead; each page shows the equivalent import line.
Coordinates are [latitude, longitude] everywhere in the API — except inside GeoJSON data, which uses [longitude, latitude]. That single inversion causes more confusion than anything else in mapping.