Can you please take a look at This Demo and let me know why I am not able to add the Raster Layer Layer: fishing_effort.tif (ID: 53) into the Map?

var map;  
function (  
Map, ArcGISDynamicMapServiceLayer,  
ready, parser,  
BorderContainer, ContentPane) {  
    ready(function () {  
        map = new Map("cpCenter", {  
            basemap: "topo",  
            center: [-9.113077, 0.759423],  
            zoom: 2  
        var layer = new ArcGISDynamicMapServiceLayer("http://renewablestoolbox.biol.sfu.ca/rorapp/rest/services/RORApp/MapServer/53")  

as you can see from the console I am getting 400 (Bad Request) error message but the layer is for sure at This Url

1 Answer 1


I think you want to remove the reference to layer ID of 53. The ArcGISDynamicMapServiceLayer is used to access an entire MapService and you are trying to point to a layer within that map service.

You can set that to be the only visible layer by doing this:

// make layer id of 53 the only visible layer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.