Skip to content

Tilelayers over HTTPS #472

@iH8

Description

@iH8

Most providers have the protocol hardcoded in to the URL:

"url": "http://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}.png"

Which throws mixed content errors to the console when loading using SSL:

Mixed Content: The page at 'https://example.org' was loaded over HTTPS, but requested an insecure image 'http://b.basemaps.cartocdn.com/light_all/12/1171/1566.png'. This content should also be served over HTTPS.

You could just go with protocol less/relative URL like some providers already have:

"url": "//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",

but that is considered an antipattern since there is no way of forcing SSL when you need it, so it would need a new option, something like this:

"url": "{protocol}://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}.png"

I'de love to do a PR for you but i'm very unfamiliar with R

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