I am attempting to add a few layers from a single feature collection in to an existing webmap (Ecology_Map) on AGOL. The feature collection consist of a point and a polygon layer:
I use the add_layer function which adds the feature collection however the polygon seems to be symbolized as a point (the same as the first layer in the collection):
Code used is here - it is a script I used in Pro
lyrsToAdd = gis.content.search(query="title:"+service_name, item_type="Feature Layer")
extent = lyrsToAdd[0].extent
Ecology_Map = WebMap(item)
Ecology_Map.add_layer(lyrsToAdd[0])
Ecology_Map.update(item_properties={'extent': extent})
In addition the Ecology_Map extent is not changed to the extent of the feature collection. Any ideas where I am going wrong?
Many thanks