ncarter77

Using ArcGISImageServiceLayer as a basmaplayer

Discussion created by ncarter77 on Oct 19, 2011
Latest reply on Oct 19, 2011 by hzhu
I can add an ArcGISImageServiceLayer with a different spatialReference than the initially set extent and other layers in the map such as the one from ESRI (http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer).  When I try to use the same Imageserver layer as a new.dijit.BasemapLayer it does not reproject correctly as when adding it by just using the usual map.addLayer function.

I have tried it two different versions of this but neither works.

Version #1
var NAIP2009params = new esri.layers.ImageServiceParameters();
    NAIP2009params.noData = 0;
    var islNAIP2009 = new esri.layers.ArcGISImageServiceLayer("http://gisservice.mt.gov/ArcGIS/rest/services/MSDI_Framework/NAIP_2009/ImageServer", {
        imageServiceParameters: NAIP2009params
    });

    var basemapNAIP2009 = new esri.dijit.Basemap({
        layers: [islNAIP2009],
        id: "bmNAIP2009",
        title: "NAIP 2009"
    });
    basemaps.push(basemapNAIP2009);

Version #2
    var basemapNAIP2009 = new esri.dijit.Basemap({
        layers: [new esri.dijit.BasemapLayer({
            url: "http://gisservice.mt.gov/ArcGIS/rest/services/MSDI_Framework/NAIP_2009/ImageServer"
        })],
        id: "bmNAIP2009",
        title: "NAIP 2009"
    });
    basemaps.push(basemapNAIP2009);

Any help or existing example is much appreciated.

Outcomes