rdevita

Point on map not where I clicked on map

Discussion created by rdevita on Apr 10, 2013
Map Display has problems inside a mobile view div.
I started with the sample code "add graphics to map: http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/graphics_add.html
Everything works fine.  I put the map inside a mobile view div.
<div id="mapView" dojoType="dojox.mobile.View" >

The map displays, but adding a point has a problem.  The point is displayed West of the clicked location.  This is consistent.
If I resize the browser, everything works fine. 
The original code was:
<div id="map" style="width:1024px; height:512px; border:2px solid #000;" class="claro"></div>

the new code is:
<div id="homeView" dojoType="dojox.mobile.View" selected="true">
</div>
<div id="mapView" dojoType="dojox.mobile.View" >
   <div id="map" style="width:1024px; height:512px; border:2px solid #000;" class="claro"></div>
</div>

Under mobile view, adding a point is always off, until the browser is resized.  It looks like the map has the wrong display size and resizing corrects the problem.

Also If It starts with the map view,  (selected=true for map view)  Everything starts out fine.  However, when the view is switched to the
home view, then bak to the map, the problem occurs.

How do I get arround this?
Thank You.

Outcomes