Select to view content in your preferred language

LayerTOC.mxml into ITitleWindow.mxml in custom web application

3077
11
01-24-2011 01:28 AM
francescodi_vito
Deactivated User
Hi guys
i have developed a custom we application! I have developed a ITitleWindow with method PopUp, so i can call a panel with a button click. Now i would like to insert in tih ITitleWindow a LayerTOC.mxml so i can open and close my services in this panel.
This thing can be done?......in the TitleWindow i have to put in the class Esri:Map and ArcgisDynamic service?
thanks
Tags (2)
0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus
Francesco,

   I can't say... I have not tried that.
0 Kudos
francescodi_vito
Deactivated User
Hi Robert
First to create ITitle Window i worked in different way!I created a new class and then I loaded several individual services in this way. Do you think this script that I wrote in class superpanel

<esri:Map id="myMap">
   <esri:extent>
    <esri:Extent xmin="12.0674850574739" ymin="41.5918637972499" xmax="13.1110231653314" ymax="42.3812560928617">
    <esri:SpatialReference wkid="4326"/> <!-- WGS84 -->
     </esri:Extent>
   </esri:extent>
   <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
   <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer" alpha="{layerAlpha.value}"/>
   <esri:ArcGISDynamicMapServiceLayer id="myDynamicService" url="http://193.204.163.134/ArcGIS/rest/services/Roma/Carg_Roma/MapServer" load="myDynamicService.defaultVisibleLayers()" alpha="{layer1.value}"/>
      <esri:ArcGISDynamicMapServiceLayer id="myDynamicService1" url="http://193.204.163.134/ArcGIS/rest/services/Roma/DEM/MapServer" load="myDynamicService1.defaultVisibleLayers()" alpha="{layer2.value}"/>
      <esri:ArcGISDynamicMapServiceLayer id="myDynamicService2" url="http://193.204.163.134/ArcGIS/rest/services/Roma/Circoscrizioni/MapServer" load="myDynamicService2.defaultVisibleLayers()" alpha="{layer3.value}"/>
      <esri:ArcGISDynamicMapServiceLayer id="myDynamicService3" url="http://193.204.163.134/ArcGIS/rest/services/Roma/Sondaggi/MapServer" load="myDynamicService3.defaultVisibleLayers()"/>
      <esri:ArcGISDynamicMapServiceLayer id="myDynamicService4" url="http://193.204.163.134/ArcGIS/rest/services/nuovi_servizi/carta_tecnica/MapServer" load="myDynamicService4.defaultVisibleLayers()" alpha="{layer4.value}"/>
      <esri:GraphicsLayer id="myGraphicsLayer"/>
  </esri:Map>






<panel:SuperPanel x="63" y="10" width="221" height="469" backgroundColor="#000000" backgroundAlpha="0.4" headerHeight="20" title="Live Maps" layout="absolute" showControls="true" enableResize="true" fontFamily="Arial" fontWeight="bold" fontSize="12" color="#000000">
   <mx:ComboBox x="10" y="10" width="195" height="15" id="myURL" fontSize="10" color="#FFFFFF">
   <mx:Array>
    <mx:String>Carg Roma</mx:String>
   </mx:Array>
   </mx:ComboBox>
   <samples:LayerTOC x="10" y="25" height="46" width="195" fontSize="10" layer="{myDynamicService}"/>
   <mx:HSlider x="45" y="68" id="layer1" minimum="0" maximum="1" value="0" snapInterval=".01" liveDragging="true"/>
   <mx:Image x="10" y="70" source="assets/alpha.png"/>
   <mx:Image x="10" y="158" source="assets/alpha.png"/>
   <mx:Image x="10" y="246" source="assets/alpha.png"/>
   <mx:ComboBox x="10" y="89" width="195" height="15" fontSize="10" color="#FFFFFF" id="myURL1">
   <mx:Array>
    <mx:String>Digital Elevation Model</mx:String>
   </mx:Array>
   </mx:ComboBox>
   <samples:LayerTOC x="10" y="104" height="54" width="195" fontSize="10" layer="{myDynamicService1}"/>
   <mx:HSlider x="45" y="156" id="layer2" minimum="0" maximum="1" value="0" snapInterval=".01" liveDragging="true"/>
   <mx:ComboBox x="10" y="177" width="195" height="15" fontSize="10" color="#FFFFFF" id="myURL2">
   <mx:Array>
    <mx:String>Circoscrizioni</mx:String>
   </mx:Array>
   </mx:ComboBox>
   <samples:LayerTOC x="10" y="192" height="54" width="195" fontSize="10" layer="{myDynamicService2}"/>
   <mx:HSlider x="45" y="244" id="layer3" minimum="0" maximum="1" value="0.3" snapInterval=".01" liveDragging="true"/>
   <mx:ComboBox x="10" y="263" width="195" height="15" color="#FFFFFF" id="myURL3" fontSize="10">
   <mx:Array>
    <mx:String>Sondaggi</mx:String>
   </mx:Array>
   </mx:ComboBox>
   <samples:LayerTOC x="10" y="279" height="78" width="195" layer="{myDynamicService3}" fontSize="10" themeColor="#009DFF"/>
   <mx:Image x="10" y="426" source="assets/alpha.png"/>
   <mx:ComboBox x="10" y="365" width="195" height="15" fontSize="10" color="#FFFFFF" id="myURL4">
   <mx:Array>
    <mx:String>CTR</mx:String>
   </mx:Array>
   </mx:ComboBox>
   <samples:LayerTOC x="10" y="381" width="195" fontSize="10" layer="{myDynamicService4}" height="46"/>
   <mx:HSlider x="45" y="424" id="layer4" minimum="0" maximum="1" value="0" snapInterval=".01" liveDragging="true"/>
  </panel:SuperPanel>

That is a panel with a script for resizable. But i would like to use title window.
What do you think?
0 Kudos