examples/website/carto-sql/README.md
This is a minimal standalone version of the Carto Integration example on deck.gl website.
Copy the content of this folder to your project.
# install dependencies
npm install
# or
yarn
# bundle and serve the app with vite
npm start
To connect your own data you need a CARTO account, if you don't have it yet, you can create a new account for free.
CARTO dashboard allows to upload your geospatial files (Shapefile, CSV, GeoJSON, KML, Geopackage...) by drag&drop. Check out this guide to import data.
If you've your data in external services like BigQuery, Snowflake, Amazon RedShift, Google Drive, PostgreSQL...) you'll be interested in connecting CARTO to your existing stack.
Once you've your data plugged in you only need to set your credentials as follow:
setDefaultCredentials({
username: '<username>',
});
If you're dealing with private data and don't want to make it public outside of your map, you need to create an API KEY and include it at your DefaultCredentials:
setDefaultCredentials({
username: '<username>',
apiKey: '<api_key>
});
For more info check the documentation of CartoLayer.
The basemap in this example is provided by CARTO free basemap service. To use an alternative base map solution, visit this guide