Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default mapbox style missing #7289

Open
ndrezn opened this issue Nov 26, 2024 · 2 comments
Open

Default mapbox style missing #7289

ndrezn opened this issue Nov 26, 2024 · 2 comments
Assignees
Labels
bug something broken P2 considered for next cycle

Comments

@ndrezn
Copy link
Member

ndrezn commented Nov 26, 2024

For Mapbox traces, it looks like either the default style is missing or is an undocumented (required) parameter.

If my memory serves me correctly, it wasn't required to specify a style, but now if a style isn't specified we see in the console:

Error: No valid mapbox style found, please set `mapbox.style` to one of:
carto-darkmatter, carto-positron, open-street-map, stamen-terrain, stamen-toner, stamen-watercolor, white-bg
or register a Mapbox access token to use a Mapbox-served style.

This isn't related to Maplibre, I can reproduce in 2.34.0. Maybe Mapbox dropped style we set as default? Setting the styles in JS works fine.

// Define the layout
const layout = {
    mapbox: {
        // style: 'carto-darkmatter', // Equivalent to mapbox_style="carto-darkmatter"
        zoom: 10,
        center: {
            lat: 45.5, // Center latitude
            lon: -73.5 // Center longitude
        }
    },
    margin: { t: 0, b: 0, l: 0, r: 0 }
};

Here's an example: https://codepen.io/ndrezn/pen/KwPKVpY

This is a bigger issue in Python where the error is only visible in the JS console and isn't shown a Python error, so it's quite confusing to debug.

This isn't an issue in the new trace types where style has a valid default.

@gvwilson
Copy link
Contributor

@archmoj is this something we need to fix in this release? if so, please bump to P1 and tag me - thanks.

@ndrezn
Copy link
Member Author

ndrezn commented Nov 26, 2024

IMO we don't need to fix this in this release and we could leave as nofix as these traces are deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P2 considered for next cycle
Projects
None yet
Development

No branches or pull requests

3 participants