AnsweredAssumed Answered

How to add multiple feature layers to a map?

Question asked by Railinc on Jul 18, 2017
Latest reply on Jul 18, 2017 by Railinc

I'd like to know how to add multiple feature layers to a map? I tried syntax like the following, but only the last feature was added.

 

from arcgis.features import FeatureLayer
from arcgis.features import FeatureCollection

my_map4 = my_gis.map('Chicago', 9)
my_map4.basemap = 'osm'

f1 = FeatureLayer('http://xxx.com/arcgis/rest/services/Stage/crew_change_point_service/MapServer/0')
f2 = FeatureLayer('http://xxx.com/arcgis/rest/services/Stage/yard_service/MapServer/0')
my_map4.add_layer([f1, f2])

my_map4

Outcomes