The gmaps package on Voila got an error
christianp8 opened this issue · comments
on Voila the example codes are like this:
lat1 = "-6.2943918"
lng1= "106.6660668"
lat2="-6.250227499999999"
lng2="106.9253219"
origin = f"{lat1},{lng1}"
destination = f"{lat2},{lng2}"
gmaps.configure(api_key=api_key)
fig = gmaps.figure()
locations = [(lat1, lng1), (lat2, lng2)]
route_layer = gmaps.directions_layer(locations[0], locations[-1])
fig.add_layer(route_layer)
display(fig)
and ond the voila apps, i got an error like this and the fig cannot be displayed:
[Open Browser Console for more detailed log - Double click to close this message]
Model class 'FigureModel' from module 'jupyter-gmaps' is loaded but can not be instantiated
TypeError: Class constructor Sn cannot be invoked without 'new'
at new t (https://cdn.jsdelivr.net/npm/jupyter-gmaps@0.9.0/dist/index.js:39:184489)
at bb._make_model (https://pythonwebsite.online/voila/static/voila.js:8:2791604)
Thank you for those who wants to help