I am unable to see route layer when I am using below code in Arcgis Javascript v4.23. It is not loading to map
let routeLayer = new MapImageLayer({url: "https://roadsandhighwayssample.esri.com/server/rest/services/RoadsHighways/NewYork/MapServer"}); map.add(routeLayer); // adds the layer to the map
let routeLayer = new MapImageLayer({
url: "https://roadsandhighwayssample.esri.com/server/rest/services/RoadsHighways/NewYork/MapServer"
});
map.add(routeLayer); // adds the layer to the map
When I am trying to add above routelayer URL in Arcgis Javascript v3.x, it is working fine.
Please suggest where it is causing issue in Arcgis Javascript v4.x
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.