I am trying to add the following layer to my ArcGIS map developed using ArcGIS SDK for JavaScript (V4.30).
Layer: https://maps2.dcgis.dc.gov/dcgis/rest/services/ROWScan/MapServer
It works correctly when I try using ArcGIS Online map viewer. I need the ROWScan layer.
The following is the expected result.
I tried to add this as a feature layer which was not successful. Please explain the type of this layer and how to add this to the ArcGIS map using the SDK.
Solved! Go to Solution.
Hi @LakshanRasingolla ,
The layer you are trying to add is from a cached MapService. You have a couple options to add this layer to a map. One and most performant way (taking advantage of the pre-made tiles) is to create a TileLayer, but in order to do this you will need a basemap in the spatial reference of the cached service, in this case WKID 26985 (Maryland NAD83) which may not be easy to find.
Your second option would be to bring this in as a MapImageLayer which should reproject the data and show it on the map. The third option would be to create a FeatureLayer from the `0` sublayer "https://maps2.dcgis.dc.gov/dcgis/rest/services/ROWScan/MapServer/0" for the Washington DC Boundary.
Codepen that shows the three layers you can create from this service: https://codepen.io/sagewall/pen/qBeBabz
Hi @LakshanRasingolla ,
The layer you are trying to add is from a cached MapService. You have a couple options to add this layer to a map. One and most performant way (taking advantage of the pre-made tiles) is to create a TileLayer, but in order to do this you will need a basemap in the spatial reference of the cached service, in this case WKID 26985 (Maryland NAD83) which may not be easy to find.
Your second option would be to bring this in as a MapImageLayer which should reproject the data and show it on the map. The third option would be to create a FeatureLayer from the `0` sublayer "https://maps2.dcgis.dc.gov/dcgis/rest/services/ROWScan/MapServer/0" for the Washington DC Boundary.
Codepen that shows the three layers you can create from this service: https://codepen.io/sagewall/pen/qBeBabz
Great work! @Sage_Wall Thanks.