I'd like to increase zoom by adding extra LODs (Levels Of Details) using a widget (code less intrusive).In debug mode it looks that the my new LODs are correctly added to the map.lods array, but zoom slider control is not refreshed.Is there a way to load the widget at the correct moment or refresh the map controls after new LODs have been added ?Thanks.ErwanEtxraLodsWidget.xml :<?xml version="1.0" ?>
<configuration>
<extralods>
<extralod level="18" resolution="0.597164283559817" scale="2256.994353" />
<extralod level="19" resolution="0.298582141647617" scale="1128.497176" />
</extralods>
</configuration>
ExtraLodsWidget.mxml :<?xml version="1.0" encoding="utf-8"?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010 ESRI
//
// All rights reserved under the copyright laws of the United States.
// You may freely redistribute and use this software, with or
// without modification, provided you include the original copyright
// and use restrictions. See use restrictions in the file:
// <install location>/License.txt
//
////////////////////////////////////////////////////////////////////////////////
-->
<viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:viewer="com.esri.viewer.*"
widgetConfigLoaded="init()" xmlns:esri="http://www.esri.com/2008/ags">
<fx:Script>
<![CDATA[
import com.esri.ags.events.MapEvent;
import com.esri.ags.layers.supportClasses.LOD;
private var extraLodsXml:XMLList;
private var extraLodsArr:Array = [];
private function init():void
{
if (configXML)
{
extraLodsXml = configXML..extralod;
addLODs();
//map.addEventListener(MapEvent.LOAD, addLODs);
//map.dispatchEvent(new MapEvent(MapEvent.LOAD));
}
}
private function addLODs():void
{
for (var i:Number = 0; i < extraLodsXml.length(); i++)
{
var lLevel:Number = Number(extraLodsXml[0].@level[0]);
var lResolution:Number = Number(extraLodsXml.@resolution[0]);
var lScale:Number = Number(extraLodsXml.@scale[0]);
map.lods.push( new LOD( lLevel, lResolution, lScale) );
}
}
]]>
</fx:Script>
</viewer:BaseWidget>