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

HTTPS support for CartoDB/MapQuest? #189

Closed
stuporglue opened this issue Oct 14, 2015 · 5 comments
Closed

HTTPS support for CartoDB/MapQuest? #189

stuporglue opened this issue Oct 14, 2015 · 5 comments

Comments

@stuporglue
Copy link

It'd be great if CartoDB and MapQuest https support could be added. I know that their HTTPS tile schemas are different, which makes it non-trivial.

In some code where I'm currently using mapquest tiles on http and https sites I am initializing the tile layer this way:

    if(window.location.protocol === 'https:'){
        subDomains = ['otile1-s','otile2-s','otile3-s','otile4-s'];
    } else{
        subDomains = ['otile1','otile2','otile3','otile4'];
    }
    return new L.TileLayer('//{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png',{...options here...})

If this could be considered as a future feature request, I'd appreciate it.

@stuporglue
Copy link
Author

Maybe something like this would be OK?

    url: '//otile{s}' + (window.location.protocol == 'https:' ? '-s' : '') + '.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.{ext}'

@jieter
Copy link
Contributor

jieter commented Oct 26, 2015

@stuporglue thanks for thinking about this issue. I think I like your proposal if we move the check to variable so it might be reused for other layers having different url schemes for http and https. Do you want to make a pull request?

thoughs @brunob?

@brunob
Copy link
Member

brunob commented Oct 26, 2015

Think it's nice to support more providers with https since letsencrypt.org is coming we will meet more and more https websites.

@jieter jieter changed the title HTTPS support? HTTPS support for CartoDB/MapQuest? Mar 15, 2016
@jieter
Copy link
Contributor

jieter commented Mar 15, 2016

#195 had this implemented, but was doing to much at once. Need to revisit this.

@brunob
Copy link
Member

brunob commented Feb 4, 2018

Fixed by #258

@brunob brunob closed this as completed Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants