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

Directions layer not showing via embed_minimal_html #351

Open
akazachk opened this issue Jul 2, 2021 · 1 comment
Open

Directions layer not showing via embed_minimal_html #351

akazachk opened this issue Jul 2, 2021 · 1 comment

Comments

@akazachk
Copy link

akazachk commented Jul 2, 2021

Hello, I am just starting out with this package (thank you for it!), and trying to following the examples, including the instructions here:

https://jupyter-gmaps.readthedocs.io/en/latest/export.html

However, the directions layer is not showing up, which may be the same issue raised on this StackOverflow issue.

Specifically, I am trying:

# Latitude-longitude pairs
geneva = (46.2, 6.1)
montreux = (46.4, 6.9)
zurich = (47.4, 8.5)

fig = gmaps.figure()
geneva2zurich = gmaps.directions_layer(geneva, zurich)
fig.add_layer(geneva2zurich)
fig

from ipywidgets.embed import embed_minimal_html

filename = 'export.html'
embed_minimal_html(filename, views=[fig])

import IPython
IPython.display.HTML(filename=filename)

The fig command works fine in a local Jupyter notebook, but embed_minimal_html does not: the map shows up, but not the directions layer. There are a few issues that are suggested by the Jupyter notebook:
Screen Shot 2021-07-02 at 13 56 08

When inspecting this more, I see a couple of warnings/errors corresponding to those broken links. One is InvalidValueError: in property travelMode: undefined and the others (corresponding to the red broken link icons in the picture) are variants of jupyter-widgets-disconnected.

If I try to open the "export.html" file outside of Jupyter, I get two errors: one is the same InvalidValueError related to travelMode, and the other is Not allowed to load local resource: file:///Users/akazachk/repos/bread_of_the_mighty/jupyter-gmaps.js.

Any help would be greatly appreciated. Thank you in advance.

@Dyleee
Copy link

Dyleee commented Jan 18, 2022

lol

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