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

Cannot load HTTP vector sources #177

Closed
keum opened this issue Oct 16, 2017 · 11 comments
Closed

Cannot load HTTP vector sources #177

keum opened this issue Oct 16, 2017 · 11 comments

Comments

@keum
Copy link

keum commented Oct 16, 2017

When I tried to load the data using https://maputnik.github.io/editor/#10.82/47.6967/-122.2273
this site, it doesn't work.
But when I do load onto this maputnik http://editor.openmaptiles.org/#10.75/47.6140/-122.3843
it works fine.
Can someone can explain the difference between maputnik that's running on github.io and another one running off openmaptiles folks?
I'll be greatly appreciated for your help.

@lukasmartinelli
Copy link
Collaborator

lukasmartinelli commented Oct 16, 2017 via email

@orangemug
Copy link
Collaborator

@keum if you use https (https://editor.openmaptiles.org/#10.75/47.6140/-122.3843) do you get the same issue?

@keum
Copy link
Author

keum commented Oct 16, 2017

@orangemug no, openmaptile version of maptunik works fine and renders the data. I think what @lukasmartinelli is thinking that http/s might has to do with it. Openmaptile.org version doesn't have https..just http. I'm trying to add source from my DigitalOcean vector tile that I've created here. http://vectortile.pkgeo.com:8080/data/wabldg.json. I think i see the problem, github's starts w/ HTTPS. any suggestion on getting around this so wabldg.json can be added to both version of maputnik? thanks as always.

@keum
Copy link
Author

keum commented Oct 17, 2017

I see why it's doing it. I need to change my tileserver to serve https instead of http. I' think you can close this issue.

@keum keum closed this as completed Oct 17, 2017
@lukasmartinelli lukasmartinelli changed the title Not able to load vector data onto maputnik.github.io editor Cannot load HTTP vector sources Oct 17, 2017
@lukasmartinelli
Copy link
Collaborator

@orangemug I imagine the majority of people will serve their tiles via HTTP... and then they cannot use maputnik.github.io to style them quickly - cause it is HTTP.

I researched you cannot disable HTTPS enforcement on GitHub pages 😢 .
So we either promote more to download maputnik locally (since you can literally just download a zip file and open with browser) or provide a HTTP alternative (host it on maputnik.com) again.

@keum
Copy link
Author

keum commented Oct 17, 2017

@lukasmartinelli there is two version for editor.openmaptiles.org
http://editor.openmaptiles.org/#8.89/47.6878/-122.4870
https://editor.openmaptiles.org/#10.73/47.5711/-122.4048
Looks like Klokan Tech is exposing both http and https...using http version, i can add vector data. what is relation between editor.openmaptiles.org maptunik & maputink.github.io ? are two are same code? thanks for the input.

@orangemug
Copy link
Collaborator

@lukasmartinelli so I'm a fan of using maputnik.com I think having our own domain would make things a lot easier in the long run. I've got a number of things I'd like to work on that might have a server component, for example full github integration using something like https://github.com/prose/gatekeeper for auth. I think if the project continues to grow having our own domain again would be inevitable.

As for the http/https issue we really should be encouraging people to use https, for security reasons. Allowing http as an option only leads users into a situation where they won't be able to use https sources later on. I think this will cause confusion for users. The exported styles will also work in bl.ocks.org and github pages, both of which don't support non SSL.

We should however show a better error if users try to enter http:// into the sources panel. With a nice message to say something like

Non SSL (http://) sources are not supported, this is due to the "Same-origin policy" of the browser, read more here

...yeah this message could be a lot better, but you get the idea

Thoughts?

@lukasmartinelli
Copy link
Collaborator

As for the http/https issue we really should be encouraging people to use https, for security reasons. Allowing http as an option only leads users into a situation where they won't be able to use https sources later on. I think this will cause confusion for users. The exported styles will also work in bl.ocks.org and github pages, both of which don't support non SSL.

For serving tiles online.
But what about people who just use it to style some tiles lying around locally.

We can resurrect maputnik.com again (reverting the maputnik.github.io PR), the CNAME is already still pointing to github.

Force push master from https://github.com/maputnik/maputnik.github.io to https://github.com/maputnik/maputnik.com and add CNAME file.

@keum
Copy link
Author

keum commented Oct 23, 2017

thanks @lukasmartinelli I agree. I think for local development, you'll just need to use locally installed Maputnik. I'm satisfied w/ options so you're free to close the tix if you would like.

@orangemug
Copy link
Collaborator

But what about people who just use it to style some tiles lying around locally.

@lukasmartinelli good point. Allowing both http and https sounds good to me at this point then.

In future I may look to create a standalone static file server that supports https. I have some experience of this with https://github.com/orangemug/manage-hosts, if anyone is interested this branch https://github.com/orangemug/manage-hosts/compare/feature/https adds self signed certs on OSX (messy but works)

@keum
Copy link
Author

keum commented Nov 3, 2017

I just finished maptime seattle last night and used https://github.com version. it's little cumbersome but when you load the source data, I needed to disabled the security on the browser in Firefox to render the http source vector data.
I also used the same method to see preview in bl.ocks.org as well...all went fantastically smooth and students loved using Maputnik to see vector tiles being stylized and able to view the web map w/ any style they wanted! I would like to close the comment on this issue.

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

No branches or pull requests

3 participants