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

POI icons don't show up when page zoom is not 100% on page load #1476

Closed
fnicollet opened this issue Sep 11, 2015 · 5 comments
Closed

POI icons don't show up when page zoom is not 100% on page load #1476

fnicollet opened this issue Sep 11, 2015 · 5 comments
Labels
Milestone

Comments

@fnicollet
Copy link
Contributor

Hello,

I have just found a weird issue in mapbox-gl-js. If you load it while the page is zoomed out (say 90%), texts appear but icons are not showing up. If you load mapbox-gl-js while page is 100% and then zoom out 90%, icons are correctly displayed.
image
instead of
image

Here is a jsfiddle for you to reproduce the issue:

http://jsfiddle.net/fnicollet/u84yapaj/

I started looking in the code but I can't seem to find the issue. There are some icon drawSymbol calls with no error, it just doesn't show. I can't find where there is code looking for pixel density or anything.
Do you have an idea why this bug is happening or a hint on where I should look in the code?

Thanks a lot,
Fabien

@lucaswoj
Copy link
Contributor

On OS X, I was not able to replicate this issue in Safari Version 8.0.8 but was able to replicate the issue in Chrome Version 45.0.2454.85.

@lucaswoj
Copy link
Contributor

Because it works in some browsers, I might start by looking at weird WebGL + page zoom interactions before I started looking for bugs in Mapbox GL JS.

@lucaswoj
Copy link
Contributor

... that, or pixel density

I can't find where there is code looking for pixel density or anything.

https://github.com/mapbox/mapbox-gl-js/search?utf8=✓&q=devicePixelRatio

@lucaswoj
Copy link
Contributor

lucaswoj commented Oct 5, 2015

@fnicollet I think I fixed this with #1593. Please re-open this ticket and ping me if you're still seeing the bug.

@lucaswoj lucaswoj closed this as completed Oct 5, 2015
fnicollet referenced this issue Jan 12, 2016
ref #1851

Fix pattern and icon rendering when pattern resolution does not match
devicePixelRatio.
@ralphking
Copy link

I am getting this issue in Chrome 60 (only Chrome) only on Windows 10, only on some machines.

I'm using a PNG as an icon, I can see it loading and follow the direct link in the browser, however mapbox is sometimes not rendering it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants