Select to view content in your preferred language

ZoomSlier (API-2)

493
3
09-07-2010 12:04 PM
ZahidChaudhry
Occasional Contributor III
I am trying to hide zoom slider but no luck. It is working but not when i want it to work..
here is what i am doing
[HTML]
protected function createhideSler():void{
myMap.zoomSliderVisible=false;
createPDF();
}
protected function createPDF():void{


}

[/HTML]

it hides the slider but at the end of the PDF creation. Any Help?

Zahid
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Zahid,

  Try myMap.validateNow(); before the pdf call.
0 Kudos
ReneRubalcava
Frequent Contributor II
I think you'll need to listen for the UPDATE_COMPLETE event from the map after turning off the zoom slider.
map.addEventListener(FlexEvent.UPDATE_COMPLETE, onUpdateComplete_handler);
map.zoomSliderVisible = false;
function onUpdateComplete_handler(e:FlexEvent):void {
 map.removeEventListener(FlexEvent.UPDATE_COMPLETE, onUpdateComplete_handler);
 createPDF();
}
0 Kudos
ZahidChaudhry
Occasional Contributor III
Thanks Robert and Odoe,
map.validateNow works fine. But the other solution Update Complete is throwing all sort of errors...

Thanks again

Zahid
0 Kudos