I've been struggling with mapping the overlaying of local shapefile with Living Atlas layers.
I was able to map it on the AGOL UI, but with Python API I'm stuck.
My approach is converted the shapefile to spatial dataframe enabled and plot to the map widget where is the Living Atlas layer already mapped. But the shapefile is not mapped. I tried to reproject the sedf to match with the basemap but still no luck (when I mapped this on AGOL UI, I don't have to reproject my shapefile)
Code to reproduce:
shp_df = pd.DataFrame.spatial.from_featureclass(location = "./data/PR_block_2020.shp", sr = 3857)
gis = GIS()
lecz_layer = gis.content.search("Low Elevation Coastal Zones derived from MERIT-DEM", item_type="Imagery Layer")
for item in lecz_layer:
display(item)
lecz = lecz_layer[0]
m1 = gis.map("Puerto Rico")
m1.content.add(lecz)
shp_df.spatial.plot(map_widget=m1, opacity=0.7)