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); }); });
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.