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

UTFGrid seems inaccurate at higher zoom levels #3

Open
BHare1985 opened this issue May 24, 2015 · 4 comments
Open

UTFGrid seems inaccurate at higher zoom levels #3

BHare1985 opened this issue May 24, 2015 · 4 comments

Comments

@BHare1985
Copy link

It seems at higher zoom levels UTFGrid isn't working like it should. To better highlight the issue I am having I made a video: https://www.youtube.com/watch?v=j3XT8p-NB6U&feature=youtu.be

@BHare1985
Copy link
Author

Incase this is hard to replicate I added the data I am using get this: -- removed --

Run it by doing : node t.js test2.xml (Note to change the t.js and xml to have relative paths to your system)

@brianreavis
Copy link
Member

What does your front-end code look like to handle the interactivity? Specifically – what resolution does it assume the UTFGrid is? The default that tilestrata-mapnik outputs is 4. It doesn't look like you're using Leaflet, but just for example Leaflet.UTFGrid has a "resolution" setting. First I'd suggest looking into that to make sure the front-end/back-end match up. Second: I haven't experimented with it much, but it might not hurt trying out different values below 4 (given you're working with strokes vs large solids).

As a total last resort, another thing that might be worth trying is a second mapnik XML for interactivity that uses slightly fatter strokes.

PS. Nice map btw.

@BHare1985
Copy link
Author

Well turns out I need <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> in my HTML tag for it to work properly. Otherwise you will get weird issues like the video shows.

@brianreavis
Copy link
Member

Ahahhh. Thanks for the info. I'll change the headers from Content-type: application/json to Content-type: application/json; charset=utf-8 (which should fix cases like these).

@brianreavis brianreavis reopened this May 25, 2015
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

2 participants