<?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 Creating feature layer by name in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/creating-feature-layer-by-name/m-p/592507#M13280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a requirement to add a feature layer to a map by being given the name of the layer.&amp;nbsp; All layers will reside on the same feature server.&amp;nbsp; Is there any way to go through all of the layers on a feature server to find the one with the correct name, create this as a FeatureLayer and add this to the map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only other alternative for me right now (that I can think of) is to have the layer number and name defined in my config.xml and use this as a lookup when I need it.&amp;nbsp; Ideally I'd just have the server URL and be able to get the layer by name somehow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope my explanation isn't too gibberish&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Sep 2010 08:21:29 GMT</pubDate>
    <dc:creator>LukeEvans</dc:creator>
    <dc:date>2010-09-10T08:21:29Z</dc:date>
    <item>
      <title>Creating feature layer by name</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/creating-feature-layer-by-name/m-p/592507#M13280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a requirement to add a feature layer to a map by being given the name of the layer.&amp;nbsp; All layers will reside on the same feature server.&amp;nbsp; Is there any way to go through all of the layers on a feature server to find the one with the correct name, create this as a FeatureLayer and add this to the map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only other alternative for me right now (that I can think of) is to have the layer number and name defined in my config.xml and use this as a lookup when I need it.&amp;nbsp; Ideally I'd just have the server URL and be able to get the layer by name somehow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope my explanation isn't too gibberish&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 08:21:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/creating-feature-layer-by-name/m-p/592507#M13280</guid>
      <dc:creator>LukeEvans</dc:creator>
      <dc:date>2010-09-10T08:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating feature layer by name</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/creating-feature-layer-by-name/m-p/592508#M13281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can create a ArcGISDynamicMapServiceLayer outside of a Map whose url is pointing at the MapServer and add a load listener to it. Once it loads, all the layers should be in the layerInfos Array. Each LayerInfo includes the name and id which you can then use to build the url for a FeatureLayer inside either the same MapServer or the corresponding FeatureServer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/ArcGISDynamicMapServiceLayer.html#layerInfos"&gt;http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/ArcGISDynamicMapServiceLayer.html#layerInfos&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 15:15:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/creating-feature-layer-by-name/m-p/592508#M13281</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-09-10T15:15:20Z</dc:date>
    </item>
  </channel>
</rss>

