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

examples don't fail gracefully #664

Closed
incanus opened this issue Aug 7, 2014 · 9 comments
Closed

examples don't fail gracefully #664

incanus opened this issue Aug 7, 2014 · 9 comments
Assignees
Labels
Milestone

Comments

@incanus
Copy link
Contributor

incanus commented Aug 7, 2014

Using a browser without WebGL support, including mobile, errors out on all of the examples. We should show how to gracefully respond here.

screen shot 2014-08-07 at 9 36 56 am

@mourner mourner added this to the post-v0.2.0 milestone Aug 7, 2014
@tmax
Copy link

tmax commented Aug 7, 2014

image

TypeError: 'undefined' is not an object (evaluating 'this.painter.resize') : map.js:176

Edit: Sorry, this actually may be a result of WebGL failing to initialize.

@mourner
Copy link
Member

mourner commented Aug 7, 2014

@razorsharp say more? platform, browser, etc.?

@peterqliu
Copy link
Contributor

WebGL's enabled by default on Chrome, but not Safari. I suggest detecting the browser type on load failure, and giving the proper instructions to enable GL (e.g. on Safari, it's under the Develop menu)

@mourner
Copy link
Member

mourner commented Aug 11, 2014

Should be fixed (see #677)

@mourner mourner closed this as completed Aug 11, 2014
@incanus
Copy link
Contributor Author

incanus commented Aug 11, 2014

Nope, still seeing this on 10.9 Safari and mobile.

@incanus incanus reopened this Aug 11, 2014
@mourner
Copy link
Member

mourner commented Aug 11, 2014

@incanus do you see this on edge code? It didn't get released and updated on the examples page yet.

@incanus
Copy link
Contributor Author

incanus commented Aug 11, 2014

How would I reach that? Sorry, no, absent any context I was testing this on the live page.

@jfirebaugh
Copy link
Contributor

I think this bug is about actually using supported() in the examples and displaying a nice in-page message if it returns false.

I'm not sure if we want to actually include if (mapboxgl.supported()) { ... } else { ... } in the example code for every example though. It might be best to have one example that demonstrates it, and have the others do a compatibility check behind the scenes.

@incanus
Copy link
Contributor Author

incanus commented Aug 11, 2014

It might be best to have one example that demonstrates it, and have the others do a compatibility check behind the scenes.

That sounds good to me. My original intent was both to avoid the failure error as well as show people how to avoid it themselves.

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

6 participants