Skip to content

findStreetsSource causes setLanguage to fail #62

@tsmock

Description

@tsmock

findStreetsSource should check the actual version instead of the URL.

It fails with bright-v9 (https://api.mapbox.com/styles/v1/mapbox/bright-v9) and satellite-v9 (https://api.mapbox.com/styles/v1/mapbox/satellite-v9). Both styles are version: 8, but neither match the check (return url && url.indexOf('mapbox.mapbox-streets-v8') > -1 || /mapbox-streets-v[1-9][1-9]/.test(url);).

This check should probably be as follows:

return (style.version && style.version == 8) ||  (url && url.indexOf('mapbox.mapbox-streets-v8') > -1 || /mapbox-streets-v[1-9][1-9]/.test(url));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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