I have application with Flex Map component. Application has several states, and map component's size is changed depending on states. When state is changed, I need to change extent. But for some reasons, map component is not recalculated by that time. I tried to change extent on resize event. I see in debug mode, that map width is changed, but when I try to set new extent, it "thinks" that map width is not changed yet. So, every time I set new Extent, it's set for the previous map state width. I tried callLater, but all the same, map component has not calculated something inside itself and sets extent for the previous map width. Thanks in advice


Using a modified example of the EventBasics API sample, I get the following event order after a state changes the size of the Map component:

  1. resize
  2. updateComplete
  3. extentChange
  4. updateComplete

Try waiting for the extentChange that happen after the resize.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.