Skip to content

CORS errors loading any sample #3

@1ec5

Description

@1ec5

Selecting any sample results in a blank map and a slew of CORSRequestNotHttp errors about bogus request URLs such as openmapsamples-highway-attributes://landuse and openmapsamples-highway-attributes://park. The culprit appears to be this source definition:

style.sources[sampleSourceId] = {
type: 'geojson',
data: `openmapsamples-${sample.getId()}://${sourceLayerId}`,
};

This comes immediately after adding a protocol for “openmapsamples-highway-attributes”. Does the client application need to set up a CORS rule for every custom MapLibre protocol generated by a sample?

Reproduces in Firefox 143.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions