Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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