A geographical object created via
geo = df.hvplot.points(‘longitudes’,‘latitudes’,geo=True, tiles=‘OSM’,color=‘red’, alpha=0.2,xlim=(-130, -60), ylim=(20, 60))
This displays fine as stand alone.
scatter = df.hvplot(x=‘x’, y='y,kind=‘scatter’,responsive=True,min_height=150)
This display fine as stand alone.
However when I do
ls2 = hv.link_selections.instance()
ls2(scatter) + ls2(geo)
returns an error “AttributeError: ‘WMTS’ object has no attribute ‘_transforms’”.
Tried with conda installs + pip installs and both yield the same error.
Any thoughts ?
Thanks in advance
Sorry to unearth a dead thread, but having run into this problem myself, I figured I would help a fellow user out. For whatever reason, the tile layer is incompatible with the linker, but you can fix it as follows:
from geoviews.element.geo import WMTS
WMTS._transforms = []
This is of course a hack, but as far as I can tell it has no negative consequences. Now there will be a _transforms
attr on your WMTS
class and you can use link selections with basemaps.
1 Like
Thanks for sharing! Would you like to submit a PR in GeoViews to fix this?
Sure, I can take a look at doing this. It should be as simple as setting that attr to an empty list at the class level.
1 Like