Skip to content

hardcoded style urls #127

Open
Open
@jonenst

Description

@jonenst

Describe the current behavior

can't override styles, can't add new styles, can't remove styles

Describe the expected behavior

should be able to override styles, remove styles, add 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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions