I'm working on gmaps in python and I want to display the result.
import gmaps.datasets
gmaps.configure(api_key='AIzaSyBlTHPQJ3JW1_VAcvRFECe-xuVfOkAVPQ4')
# 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
It seems like it works well in Jupyter, but in pycharm it displays nothing.
Why this happens? How can I export the result?
a Spyder maintainer said on one post that in a Spyder IDE the gmaps doesn't display the map. So, I think is the same problem with Pycharm. It only displays maps using jupyter. You can check the answer on this link: Gmaps does not show up in Spyder
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.