mapbox/mapboxgl-jupyter

Example Documentation Loads Map but no Points

hunterowens opened this issue · 6 comments

Hi!

I'm trying to make the example plots render, spefically, the CADC Points example. However, I get the followed evented error in chrome and the plot only renders a map/legend, no points.
screen shot 2018-06-10 at 15 13 20

Using chrome, python3, mac os x.

Hi @hunterowens thanks for the bug report - can you confirm how you are running the examples (jupyter notebook run from the /examples directory in this repository?), and the specific example notebook you are using?

Hi @ryanbaumann. I have run the examples in the example directory from master on the point-viz-categorical notebook. See screenshot of error.

screen shot 2018-06-11 at 10 44 26

Great, thanks for the screenshot. Looks like you're using Jupyter Lab - Jupyter Lab does not support the same method for loading local resources (a local geojson file). Can you try the examples using juypter notebook?

Jupyter lab is supported using in-line geojson sources. Details here - #50

Works, thanks @ryanbaumann.

I'm going to close this issue, but I think it would be helpful to have some sort of warning message for MapboxGL in the lab environment. How much of a lift would a PR be on that?

Thanks @hunterowens. The ideal PR would be to figure out what the URL prefix should be in Jupyter Lab to access local resources #50 (comment), or to just use a local geojson format object instead of loading the geojson via an HTTP get request for the examples.