sabman / carto-vl-webpack-demo

Simple demo about how to use CARTO VL with webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using CARTO VL

Working example

If you just want to try with this already configured webpack project just build the source and open the index.html file with:

yarn
yarn build
open index.html

With npm and webpack

If you want to replicate this configuration in another project, these are the steps we have followed here:

Install CARTO VL

(>= v1.0.0)

yarn add @carto/carto-vl

Install mapbox-gl

(>= v0.50.0)

yarn add mapbox-gl

Note: Check the installed version is the same as the one referenced at index.html stylesheet link for the .css

Use it in your javascript code

const mapboxgl = require('mapbox-gl');
const carto = require('@carto/carto-vl');

About

Simple demo about how to use CARTO VL with webpack


Languages

Language:JavaScript 63.6%Language:HTML 36.4%