Solved! Go to Solution.
Sorry for the bad code. Maybe the quickest way to test my idea is to center your map first and then to scale. This will cause the event to fire after the map is manipulated.
As for the type error, I was wrong about the arguments needed for the extent change event. I would investigate the api at http://help.arcgis.com/en/webapi/flex/apiref/index.html
In the older viewer, the infoPopup listens for the extent event and changes its location accordingly. When you set the map scale to the zoom scale, this fires the extent event, but than you further manipulate the map by setting its center which does not fire the event. Maybe this is why the infowindow is offset from the point?
map.dispatchEvent(new ExtentEvent(ExtentEvent.EXTENT_CHANGE));
If this is the cause, I think you could center the map first and then zoom to new extent
or
you could manually dispatch the ExtentEvent.EXTENT_CHANGE to force infopopup to change location.map.dispatchEvent(new ExtentEvent(ExtentEvent.EXTENT_CHANGE));
-
Sorry for the bad code. Maybe the quickest way to test my idea is to center your map first and then to scale. This will cause the event to fire after the map is manipulated.
As for the type error, I was wrong about the arguments needed for the extent change event. I would investigate the api at http://help.arcgis.com/en/webapi/flex/apiref/index.html