<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Get WmsMapServiceLayer loaded in map in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81239#M1835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all, I am trying get a layer of type WMSMapServiceLayer loaded in the map using the actionscript class&amp;nbsp; "WMSMapServiceLayer.as" extended of the class DynamicMapServiceLayer with the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for each (var layerId:String in map.layerIds) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; var layer:Layer = map.getLayer(layerId);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but when I try to ask the type of layer (ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, WMSMapServiceLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if(layer is ArcGISDynamicMapServiceLayer){&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}else if(layer is ArcGISTiledMapServiceLayer){&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}else if(layer is WMSMapServiceLayer){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; //condition is not true when layer is WMSMapServiceLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The condition for the layer WMSMapServiceLayer is not true, even when the object layer is of type &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"com.geospatialfocus.WMSMapServiceLayer (@11839479)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestion to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: The service wms load fine in the map, but I need to do some whit it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alexander Mena&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Sep 2010 19:45:22 GMT</pubDate>
    <dc:creator>AlexanderMena</dc:creator>
    <dc:date>2010-09-01T19:45:22Z</dc:date>
    <item>
      <title>Get WmsMapServiceLayer loaded in map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81239#M1835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all, I am trying get a layer of type WMSMapServiceLayer loaded in the map using the actionscript class&amp;nbsp; "WMSMapServiceLayer.as" extended of the class DynamicMapServiceLayer with the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for each (var layerId:String in map.layerIds) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; var layer:Layer = map.getLayer(layerId);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but when I try to ask the type of layer (ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, WMSMapServiceLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if(layer is ArcGISDynamicMapServiceLayer){&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}else if(layer is ArcGISTiledMapServiceLayer){&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}else if(layer is WMSMapServiceLayer){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; //condition is not true when layer is WMSMapServiceLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The condition for the layer WMSMapServiceLayer is not true, even when the object layer is of type &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"com.geospatialfocus.WMSMapServiceLayer (@11839479)".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestion to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: The service wms load fine in the map, but I need to do some whit it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alexander Mena&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 19:45:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81239#M1835</guid>
      <dc:creator>AlexanderMena</dc:creator>
      <dc:date>2010-09-01T19:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: Get WmsMapServiceLayer loaded in map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81240#M1836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does this apply? See message #2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/11960-com.esri.ags.symbols.TextSymbol-is-not-TextSymbol-in-FlexViewer-widget"&gt;http://forums.arcgis.com/threads/11960-com.esri.ags.symbols.TextSymbol-is-not-TextSymbol-in-FlexViewer-widget&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Sep 2010 22:58:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81240#M1836</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-09-01T22:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get WmsMapServiceLayer loaded in map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81241#M1837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Dasa, but it not worked for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working with "Flexviewer version 1.0 update 12-16-2009" and my method WidgetManager.loadWidget() this is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;info.load().&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, I added the class WmsMapServiceLayer in the MapManager.config() as follows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import com.geospatialfocus.WMSMapServiceLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;case "wms":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; var wmslayer:WMSMapServiceLayer = new WMSMapServiceLayer();&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; wmslayer.url = url;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; wmslayer.wmsLayer = wmsLayers;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; wmslayer.id = label;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; wmslayer.serviceName = label;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; wmslayer.srs = "EPSG:"+map.spatialReference.wkid;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; wmslayer.format= format;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; wmslayer.visible = visible;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; wmslayer.alpha = alpha;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; map.addLayer(wmslayer);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; break;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and so the condition in the other widget is now true. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is great. All is working fine, but I don't understand why is it fine ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I appreciate any reason.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 16:37:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81241#M1837</guid>
      <dc:creator>AlexanderMena</dc:creator>
      <dc:date>2010-09-02T16:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get WmsMapServiceLayer loaded in map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81242#M1838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By adding that code to the MapManager, you've made the WMSMapServiceLayer class definition exist in the main app's swf. When this main app loads widgets into child ApplicationDomains, the widgets first inherit all of the parents class definitions, so now your widgets are sharing the same definition.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 19:18:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/get-wmsmapservicelayer-loaded-in-map/m-p/81242#M1838</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-09-02T19:18:20Z</dc:date>
    </item>
  </channel>
</rss>

