0

I want to make an image as a background map to my application. I am using ArcGIS API with JavaScript and all I could do is to add an Image Layer to this map

map = new Map("map");

    // create and add the layer  
    mil = new MapImageLayer({ "id": "usgs_screen_overlay" });  
    map.addLayer(mil);

    // create and add the image  
    var extent = new Extent({ 'xmin': 0, 'ymin': 0, 'xmax': -8762763, 'ymax': 3976997, 'spatialReference': { 'wkid': 1 }});
    var mi = new MapImage({  
        "extent": extent,
        "href": "a.jpg"  
    });
    mil.addImage(mi);

I am looking for a better way to do that.

  • 1
    Can you please explain a bit more about what you mean by "image as a background map to my application"? Do you mean you want to set an image as your basemap, or you want to use a map as the background of your website? Or something else? Thanks! – GavinR Jan 2 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.