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

No symbols shown when using GeoJSON with Mapbox newer then 0.11.1 #1792

Closed
buma opened this issue Dec 3, 2015 · 8 comments
Closed

No symbols shown when using GeoJSON with Mapbox newer then 0.11.1 #1792

buma opened this issue Dec 3, 2015 · 8 comments

Comments

@buma
Copy link

buma commented Dec 3, 2015

If I use GeoJSON with custom symbols or symbols from mapbox symbol set none of them are shown if I use Mapbox gl/js newer then 0.11.1.

On jsbin I put minimal sample. It has much smaller geojson which shows that oneway icons are shown at least on two edges but they should be on all. But if I update mapbox version to 0.11.2 for js and css they aren't shown on any edge.

It is probably similar issue to #1563 but the text labels are rendered even on newer mapbox versions not on all edges but at least on same number as in version 0.11.1.
Rendering of symbols from mapbox works even on newer versions if I use mapbox tiles instead of GeoJSON. I don't know about custom symbols I tested Mapbox street layer.

@lucaswoj
Copy link
Contributor

lucaswoj commented Dec 3, 2015

I can confirm this is a bug introduced in v0.11.2. It could be related to any of (or none of)

HINDSIGHT EDIT: it was related to none of these 😬

@mourner
Copy link
Member

mourner commented Dec 3, 2015

Let's do git bisect.

I can confirm this is a bug introduced in v0.11.2. It could be related to
any of (or none of)


Reply to this email directly or view it on GitHub
#1792 (comment)
.

Vladimir Agafonkin
http://agafonkin.com/en
+380 (93) 745 44 61

@lucaswoj
Copy link
Contributor

lucaswoj commented Dec 3, 2015

Bisects to 3532d80, which specifically mentions 1-way arrows.

fix layer minZoom being ignored if not less than source maxZoom

This condition led to layers with high minzoom like oneway street
arrows (z15) get parsed and placed regardless of minzoom (e.g. z11+),
wasting a lot of worker CPU time.

It became unnecessary after we added reparsing tiles when overscaling,
and even before that it should have probably been <= rather than <.
Native has the same bug.

In this case, the arrows are set to show between zoom levels 15 and 22 but are not being displayed at zoom 18.

@lucaswoj
Copy link
Contributor

lucaswoj commented Dec 3, 2015

Because the default maxzoom for GeoJSON sources is 14, these one way arrows are not being rendered at zoom levels 15 to 22.

@mourner Do you think there's an actionable fix there? Should we increase the default zoom of GeoJSON sources? Add some additional logic?

@buma You can fix the problem by adding "maxzoom": 22 to your GeoJSON source definition. (And maybe you'd prefer setting "icon-ignore-placement": true in the layer style definition.)

@lucaswoj
Copy link
Contributor

lucaswoj commented Dec 3, 2015

@buma Here's a modified jsbin with the suggested fixes in place. Happy mapping! 🌐

@mourner
Copy link
Member

mourner commented Dec 3, 2015

@lucaswoj ah, yeah, I think we should bump it to at least 16 which is what Mapbox Streets v7 uses, but can go deeper (say 18) — it won't affect performance noticeably.

@lucaswoj
Copy link
Contributor

lucaswoj commented Dec 3, 2015

@mourner Does the source's maxzoom affect geojson-vt's tile generation? If so, it seems wrong to remove the ability to render sprites on overzoomed geojson-vt tiles.

@buma
Copy link
Author

buma commented Dec 4, 2015

That was fast! Thanks to all of you it works great now! But it seems there should be a FAQ or documentation about GeoJSON default maxzoom or it should be changed.

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