Using Flex 2.2, a 9.3.1 ags service for some feature layers, and both the esri topo and bing as baselayersI need to center the map based on a user click location when the user subsequently zooms in using the navigation control - either the zoomslider or a mousewheel zoom in. So for instance, the user clicks a graphic in the feature layer to show an infoWindow. Then the user uses the zoom bar to zoom in. On the zoom in, I want to recenter the map to that original click location. I can't seem to zoom the map correctly to that pointIf I center the map in the extentchangehandler, that event is fired before the baselayer updateEvents and what happens is the featurelayers get centered correctly but the basemap (the esri topo or the bing map shifts). If I center the map in the UpdateEnd event on the basemaps, the basemap shifts back to the center and aligns with the feature layers but this is an extra map extent change that should be unnecessary. What I would like to do is either figure out what I am doing wrong in the extent change handler, that seems to throw the basemap off or better yet, I would like to add a listener on the zoomevent and change the zoom in event to a new center (based on a user click location). I can't seem to change the event or stop it at all to create my own zoom event. I have added a listener on the map - tried both ways
//in the loadHandler :
mainMap.addEventListener(ZoomEvent.ZOOM_START, onZoomStart, true, 999, false);
//and in the map tag
<esri:Map id="mainMap"
zoomStart="onZoomStart(event), true, 999"
in the onZoomStart function I tried first to recenter the zoom in :event.extent.centerAt(infoWindowClickLocation);that didn't work so I just tried to see it I could stop the ZoomEvent with
event.stopImmediatePropagation(); and event.stopPropagation();
which didn't work either.Any ideas or better way of zooming to click position (using the map navigation controls and not at the same time as the click) ?