Select to view content in your preferred language

add_layer works but feature collection symbology is wrong. Exent also is not recognized.

06-01-2021 06:06 AM
Occasional Contributor

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 ="title:"+service_name, item_type="Feature Layer")
        extent = lyrsToAdd[0].extent
        Ecology_Map = WebMap(item)
        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 

0 Kudos
0 Replies