I am currently working with a web app, which could allow the users to log in with their ArcGIS Online Accounts and draw their contents on the map. The confusing part of this process is that it is really hard to determine which Function should I use to draw the layer. I come up with a matrix about the most used layers, and which function that needed to be used based on item's metadata. This might be incomplete:
| type | displayName | ArcGIS Function | URL(ID) to Use |
| Web Map | Web Map | Map | itemid |
| KML | KML | KMLLayer | itemDataUrl |
| Feature Service | Feature layer | FeatureLayer | url |
| Feature Collection | Feature layer | FeatureLayer | itemDataUrl |
| Image Service | Imagery Layer | ArcGISImageServiceLayer | url |
| Vector Tile Service | Tile Layer | VectorTileLayer | url |
| Map Service | Tile Layer | ArcGISTiledMapServiceLayer | url |
| Map Service | Map Image Layer | ArcGISDynamicMapServiceLayer | url |
Any suggestions for the best practice for this problem?
Thanks