Adding a layer into a map in ArcGIS API for Python

1880
3
05-11-2017 12:34 PM
IreneGarousi-Nejad
New Contributor II

I have got a raster image (prism = gis.content.get('e10e3bac15054659bada56893f55983a')) in ArcGIS API for Python environment and now when I want to add this layer to the map which I previously called (map1 = gis.map('box elder county, utah')), the raster layer is not shown. Could you please let me know how to add layers to a map? 

I have looked at using imagery layers | ArcGIS for Developers  example and did not find a way to add new rasters or features layers into an open map. 

Thanks,

0 Kudos
3 Replies
KaushikMysorekar
New Contributor III

Here is an example; I've also attached a jupyter notebook for this for you to try out.

IreneGarousi-Nejad
New Contributor II

Thank You! Actually, I have went through these steps and now my question is how to view the added layer? Because when I use the command "map.add_layer('name_of_the_layer') it does not show me the added layer.  

0 Kudos
KaushikMysorekar
New Contributor III

Is your layer shared? Do you have access to it? You might need pass in credentials if it's not shared.

0 Kudos