JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.45k stars 186 forks source link

Interactive plot missing with geoviews #1011

Open kanglcn opened 1 year ago

kanglcn commented 1 year ago

Hi,

I want to make an interactive plot with google map imagery as the base map. It works in python, but the plot is missing in Julia. Here is minimal example:

In Python:

from geoviews import element as elmt
GoogleMapsImagery = elmt.WMTS("https://mt1.google.com/vt/lyrs=s&x={X}&y={Y}&z={Z}",
                              name="GoogleMapsImagery")
GoogleMapsImagery

will generate a interactive map like image

When converting it to Julia:

using PyCall
elmt = pyimport("geoviews.element")
GoogleMapsImagery = elmt.WMTS("https://mt1.google.com/vt/lyrs=s&x={X}&y={Y}&z={Z}",
    name="GoogleMapsImagery")
GoogleMapsImagery

No plot shows up. It only prints

PyObject :WMTS   [Longitude,Latitude]

I am using Julia 1.8.2 and the PyCall.jl version is v1.94.1. How to fix it? Thanks for your help!