Skip to content

hardcoded style urls #127

Description

@jonenst

Describe the current behavior

can't use new styles

Describe the expected behavior

should be able to use style

Describe the steps

No response

Environment

No response

Relevant Log Output

No response

Extra Information

const getMapStyle = (mapLibrary: MapLibrary, mapTheme: MapTheme) => {
switch (mapLibrary) {
case MAPBOX:
if (mapTheme === LIGHT) {
return 'mapbox://styles/mapbox/light-v9';
} else {
return 'mapbox://styles/mapbox/dark-v9';
}
case CARTO:
if (mapTheme === LIGHT) {
return 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json';
} else {
return 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json';
}
case CARTO_NOLABEL:
if (mapTheme === LIGHT) {
return 'https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json';
} else {
return 'https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json';
}
default:
return 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json';
}
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions