AnsweredAssumed Answered

new Map() versus arcgisUtils.createMap()

Question asked by davidfkimball on Apr 3, 2014
Latest reply on Apr 3, 2014 by davidfkimball
This is a pretty basic question, but I haven't been able to find an answer after much searching.

I want to create a map in my custom Javascript API application from an ArcGIS.com web map. I have tried the following methods:

arcgisUtils.createMap(webmapid, "mapDiv").then(function (response) {map = response.map;});


and

map = new Map("mapDiv", {  basemap: "topo",  autoResize: false, // see http://forums.arcgis.com/threads/90825-Mobile-Sample-Fail  center: [-71.7, 42.35],  zoom: 8,  minZoom: 7,  logo: false,  slider: true,  sliderStyle: "small" });


The first one creates a map using my ArcGIS.com web map. The second one creates an empty map (basemap only) with a bunch of attributes I need (autoResize:false to deal with a map resize bug, etc). I want to do both - use my webmap and assign all those attributes to the map. How can I do this? Why are there two ways to create a map?

Thanks,

David

Outcomes