require([ 'esri/map', 'esri/layers/ArcGISImageServiceLayer' ], function(Map, ArcGISImageServiceLayer) { var map = new Map('map', { autoResize: true, center: [762120.3983057996, 4286928.371310163], scale: 2888.131627324678 }), imgurl = 'http://moimagery.missouri.edu/arcgis/rest/services/LGov/EWGateway2012_6inch/ImageServer'; map.addLayers([new ArcGISImageServiceLayer(imgurl)]); map.on('click', function() { console.debug('MAP CENTER: ', map.extent.getCenter()); console.debug('MAP SCALE: ', map.getScale()); }); });
Map: Geometry (wkid: 4326) cannot be converted to spatial reference of the map (wkid: 26915)
require([ 'esri/map', 'esri/layers/ArcGISImageServiceLayer', 'esri/SpatialReference' ], function(Map, ArcGISImageServiceLayer, SR) { var map = new Map('map', { autoResize: true, spatialReference: new SR({wkid:26915}), center: [762120.3983057996, 4286928.371310163], scale: 2888.131627324678 }), imgurl = 'http://moimagery.missouri.edu/arcgis/rest/services/LGov/EWGateway2012_6inch/ImageServer'; map.addLayers([new ArcGISImageServiceLayer(imgurl)]); map.on('click', function() { console.debug('MAP CENTER: ', map.extent.getCenter()); console.debug('MAP SCALE: ', map.getScale()); }); });
require([ 'esri/map', 'esri/layers/ArcGISImageServiceLayer', 'esri/SpatialReference', 'esri/geometry/Extent' ], function(Map, ArcGISImageServiceLayer, SpatialReference, Extent) { var ext = new Extent(689690.1735286616, 4231176.807089917, 739306.7413302765, 4256822.370572377, new SpatialReference({wkid: 26915})), map = new Map('map', { autoResize: true, extent: ext }), imgurl = 'http://moimagery.missouri.edu/arcgis/rest/services/LGov/EWGateway2012_6inch/ImageServer'; map.addLayers([new ArcGISImageServiceLayer(imgurl)]); });
Solved! Go to Solution.
var renesPoint = new esri.geometry.Point(762120, 4286928, new esri.SpatialReference({ wkid: 26915 })); ... center: renesPoint
var renesPoint = new esri.geometry.Point(762120, 4286928, new esri.SpatialReference({ wkid: 26915 })); ... center: renesPoint