Map Configuration

Configure the map variables and CARTO APIs

Once you have your development server up and running, you can set your global map and CARTO account settings for your application. Navigate to ../src/data/C.js and you will see the following settings:

const C = {    
    SQL_API_URL: 'https://username.carto.com/api/v2/sql?q=',    
    BASEMAP: 'https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png',    
    BASEMAP_LABELS: 'https://{s}.basemaps.cartocdn.com/rastertiles/voyager_only_labels/{z}/{x}/{y}.png',    
    USERNAME: 'username',    
    API_KEY: 'default_public',    
    CENTER: [33.753707, -84.389363],    
    ZOOM: 6 };
export default C

Simply change any of these variables to configure your map settings and they will be imported into the correct components to render your map properly. That’s it!

Last updated