From jupyter notebook, I am trying to add a layer "USA NAIP Imagery", which is in color infrared, in my map using the map.add_layer(). The image rendered is in natural color and not in false color.
It works fine using ArcGIS online when I create a map with the same layer and save it. Also, if I load the saved map in jupyter notebook using MapView the false color renders as expected.
I tried passing a renderer called FalseColorComposite in the map.add_layer() but still doesn't work.
Any suggestions or corrections?
Thanks
ed
myMap = gis.map("Sedona, AZ")
myMap
image_search2_title = "USA NAIP Imagery"
image_search2 = gis.content.search(image_search2_title, item_type="Imagery Layer", outside_org=True)
image_search2
for image in image_search2:
if image.title == image_search2_title + ": Color Infrared":
image_layer2 = gis.content.get(image.id)
break
image_layer2
myMap.add_layer(image_layer2, options={'opacity': 1.0, "type": "FeatureLayer", "renderer": "FalseColorComposite", "field_name: "band_indexes"})
myMap