function init() { var map = new esri.Map("mapDiv", { center: [-123.3673, 54.51], zoom: 6, basemap: "topo", extent: new esri.geometry.Extent({spatialReference: { wkid: 32610 }}) }); }
The MapImageLayer class is used to add georeferenced images to the map. The map will place the georeferenced images at the specified geographic extent. The extent of the image should be within the map's extent. The image should also be in the same coordinate system as the map.
/*global require*/ require(["dojo/ready", "esri/map", "esri/layers/MapImageLayer", "esri/layers/MapImage"], function (ready, Map, MapImageLayer, MapImage) { "use strict"; ready(function() { var map = new Map("mapDiv", { center: [-123.3673, 54.51], zoom: 6, basemap: "topo" }); // create and add the layer var mil = new MapImageLayer({ 'id': 'usgs_screen_overlay' }); map.addLayer(mil); // create and add the actual image var mi = new MapImage({ 'extent': { 'xmin': -125.1823, 'ymin': 53.4984, 'xmax': -121.5028, 'ymax': 55.5116, 'spatialReference': { 'wkid': 4326 } }, 'href': 'TILERGB.jpg' }); mil.addImage(mi); }); });
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.