I'm currently working in a Jupyter Notebook and attempting to plot feature classes from a local geodatabase. To my surprise, it seems that sedf.spatial.plot(map_widget=map) only works with polygons; it doesn't seem to function properly with points and polylines.
Here's the code snippet I'm working with:
# Creating SEDF objects
f1 = r"VisualPythonAPI\FirePoints.gdb\Counties_Montana"
f2 = r"VisualPythonAPI\FirePoints.gdb\FirePoints_Full"
sedf1 = pd.DataFrame.spatial.from_featureclass(f1)
sedf2 = pd.DataFrame.spatial.from_featureclass(f2)
# Setting up the map
map1 = gis.map('Montana')
map1
# Plot the data to map1
sedf1.spatial.plot(map1)
sedf2.spatial.plot(map1)
#result
Note:
I also attempted to plot the same feature class in shapefile format, and it was successfully displayed on the map.
Hello
I think this question may have been answered via this Solution; see below:
Solved: Jupyter Lab spatial.plot local gdb multiple featur... - Esri Community
I hope this works.
many thanks ed