Closed mrickard26 closed 7 years ago
In v100 you have to work this out yourself. We have talked about and designed a factory method to do this for you in a future release (e.g. Layer.createFromPortalItem).
You will have to create a map image layer from the portal item, get its service info and work out if its tiled or not. If its a tiled service, you can then check the spatial reference of the layer compared to the map, if they are the same, you should use a tiled layer, if they are different use a map image layer.
Given a PortalItem of type MapService, how do I know what layer type I should create and add to my map? ArcGISMapImageLayer, ArcGISTiledLayer, etc. .Net