Skip to content

Custom basemaps are broken ({x} is URL-encoded) #6

@dzfranklin

Description

@dzfranklin

When I add a custom basemap with URL 'https://example.com/tms/{z}/{x}/{y}.png' the value in the input box is transformed to https://example.com/tms/%7Bz%7D/%7Bx%7D/%7By%7D.png. I see network requests to that incorrect transformed value.

This fixes it: localStorage.setItem("customBasemapSources", JSON.stringify(JSON.parse(localStorage.getItem("customBasemapSources")).map(v=>({...v, url: decodeURIComponent(v.url)}))))

I suspect you are parsing the input as a URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions