Select to view content in your preferred language

visible="{myMap.scale < 4500}"  shows error

650
2
12-25-2010 10:44 PM
debhasishbhakta
New Contributor
Sir,
I am using Arcgis api for flex 1.3 and flex builder 3.
I have copy source code from link "http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html?sample=VETiledLayer"
but it was not working. the code are


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:esri="http://www.esri.com/2008/ags">
<mx:Script>
<![CDATA[
import com.esri.ags.layers.LOD;
private function addLODs():void
{
var lods:Array = myMap.lods;
lods.push( new LOD( NaN, 0.00000713838288433451, 3000) );
lods.push( new LOD( NaN, 0.00000356919144216726, 1500) );
lods.push( new LOD( NaN, 0.00000118973048072242, 500) );
// About NaN: sorts based on scale, so setting level isn't needed
myMap.lods = lods;
}
]]>
</mx:Script>
<mx:Text fontSize="11" width="100%" text="Zoom in past 1:4,500 and you'll notice the basemap switching. When zoomed out, ArcGIS Online Street Map is used, but when zoomed in a dynamic service for Louisville, KY will display parcels, landuse, and planning." />
<esri:Map load="addLODs()" id="myMap">
<esri:extent>
<esri:Extent xmin="-85.804" ymin="38.270" xmax="-85.797" ymax="38.275"/>
</esri:extent>
<esri:ArcGISTiledMapServiceLayer visible="{myMap.scale > 4500}" url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
<esri:ArcGISDynamicMapServiceLayer visible="{myMap.scale < 4500}" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/M..."/>

</esri:Map>
</mx:Application>


the code under visible="{myMap.scale < 4500}" shows error when I am using in <esri:ArcGISDynamicMapServiceLayer/> even I have replace the < symbol by &lt but again same problem persist
plz....give a solution
my email id is deviirmr@gmail.com
Tags (2)
0 Kudos
2 Replies
ReneRubalcava
Esri Frequent Contributor
You can try wrapping it in a CDATA block
visible="<![CDATA[{myMap.scale < 4500}]]>"
0 Kudos
DasaPaddock
Esri Regular Contributor
You can also use:

visible="{myMap.scale &lt; 4500}"
0 Kudos