Select to view content in your preferred language

resizing the map

784
1
11-01-2013 09:05 PM
EdwardSohn
New Contributor
I define a div tag so
<div id="mainMap"></div>
and load a map to it by:
var map = new Map("mainMap", {
          center: [-96.5, 38.3],
          zoom: 6
      });
and then add a basemap layer to it:
var topo = new ArcGISTiledMapServiceLayer(customBaseUrl);
map.addLayer(topo);

But then I have need to resize teh mainMap div tag.
But the contained map does not seem to scale with the resized div tag.

What can be done to rescale the map with the containing div tag...
0 Kudos
1 Reply
EdwardSohn
New Contributor
Resolved it.

just calling map.resize(true);
0 Kudos