<?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 Limiting layers on a map in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/limiting-layers-on-a-map/m-p/121408#M766</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the FEMA flood base map service located at&lt;/P&gt;&lt;P&gt;&lt;A href="http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer" title="http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer"&gt;public/NFHL (MapServer)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This base map service has many layers. I am interested in layers 3,27 and 28.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried limiting the layers using the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var imageParameters = new ImageParameters();&lt;/P&gt;&lt;P&gt; imageParameters.layerIds = [3,27,28];&lt;/P&gt;&lt;P&gt; imageParameters.layerOption = ImageParameters.LAYER_OPTION_SHOW;&lt;/P&gt;&lt;P&gt;&amp;nbsp; imageParameters.transparent = false;&lt;/P&gt;&lt;P&gt;var dynamicMapServiceLayer = new EsriArcGISDynamicMapServiceLayer(oneLayer.url,{"ImageParameters": imageParameters});&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;map&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;addLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;dynamicMapServiceLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;The request goes out to FEMA as below. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun" style="color: #666600;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2989c5; font-family: Calibri;"&gt;&lt;A href="http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export?dpi=96&amp;amp;transparent=true&amp;amp;format=png8&amp;amp;bbox=1882592.243115291%2C536521.0518318419%2C1886196.1399064175%2C537555.9451516285&amp;amp;bboxSR=102008&amp;amp;imageSR=102008&amp;amp;size=1285%2C369&amp;amp;f=image"&gt;http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export?dpi=96&amp;amp;transparent=true&amp;amp;format=png8&amp;amp;bbox=1882592.243115291%2C536521.0518318419%2C1886196.1399064175%2C537555.9451516285&amp;amp;bboxSR=102008&amp;amp;imageSR=102008&amp;amp;size=1285%2C369&amp;amp;f=image&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct request should be as below requesting only the layers needed&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;A href="http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export?dpi=96&amp;amp;transparent=true&amp;amp;format=png32&amp;amp;layers=show:0,1,2,3,9,10,14,16,21,23,24,27,28&amp;amp;bbox=-7944379.251887456,5229071.73982415,-7941752.485181711,5231734.451758499&amp;amp;bboxSR=102100&amp;amp;imageSR=102100&amp;amp;size=950,963&amp;amp;f=image"&gt;http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export?dpi=96&amp;amp;transparent=true&amp;amp;format=png32&amp;amp;&lt;STRONG style="background: #feff00;"&gt;layers=show:3,27,28&lt;/STRONG&gt;&amp;amp;bbox=-7944379.251887456,5229071.73982415,-7941752.485181711,5231734.451758499&amp;amp;bboxSR=102100&amp;amp;imageSR=102100&amp;amp;size=950,963&amp;amp;f=image&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need to modify add something to my code snippet in order to request the only the layers that I need/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Neema&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Feb 2016 23:25:46 GMT</pubDate>
    <dc:creator>NeemaGudur</dc:creator>
    <dc:date>2016-02-26T23:25:46Z</dc:date>
    <item>
      <title>Limiting layers on a map</title>
      <link>https://community.esri.com/t5/developers-questions/limiting-layers-on-a-map/m-p/121408#M766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the FEMA flood base map service located at&lt;/P&gt;&lt;P&gt;&lt;A href="http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer" title="http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer"&gt;public/NFHL (MapServer)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This base map service has many layers. I am interested in layers 3,27 and 28.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried limiting the layers using the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var imageParameters = new ImageParameters();&lt;/P&gt;&lt;P&gt; imageParameters.layerIds = [3,27,28];&lt;/P&gt;&lt;P&gt; imageParameters.layerOption = ImageParameters.LAYER_OPTION_SHOW;&lt;/P&gt;&lt;P&gt;&amp;nbsp; imageParameters.transparent = false;&lt;/P&gt;&lt;P&gt;var dynamicMapServiceLayer = new EsriArcGISDynamicMapServiceLayer(oneLayer.url,{"ImageParameters": imageParameters});&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;map&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;addLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;dynamicMapServiceLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;The request goes out to FEMA as below. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun" style="color: #666600;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2989c5; font-family: Calibri;"&gt;&lt;A href="http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export?dpi=96&amp;amp;transparent=true&amp;amp;format=png8&amp;amp;bbox=1882592.243115291%2C536521.0518318419%2C1886196.1399064175%2C537555.9451516285&amp;amp;bboxSR=102008&amp;amp;imageSR=102008&amp;amp;size=1285%2C369&amp;amp;f=image"&gt;http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export?dpi=96&amp;amp;transparent=true&amp;amp;format=png8&amp;amp;bbox=1882592.243115291%2C536521.0518318419%2C1886196.1399064175%2C537555.9451516285&amp;amp;bboxSR=102008&amp;amp;imageSR=102008&amp;amp;size=1285%2C369&amp;amp;f=image&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correct request should be as below requesting only the layers needed&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;A href="http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export?dpi=96&amp;amp;transparent=true&amp;amp;format=png32&amp;amp;layers=show:0,1,2,3,9,10,14,16,21,23,24,27,28&amp;amp;bbox=-7944379.251887456,5229071.73982415,-7941752.485181711,5231734.451758499&amp;amp;bboxSR=102100&amp;amp;imageSR=102100&amp;amp;size=950,963&amp;amp;f=image"&gt;http://hazards.fema.gov/gis/nfhl/rest/services/public/NFHL/MapServer/export?dpi=96&amp;amp;transparent=true&amp;amp;format=png32&amp;amp;&lt;STRONG style="background: #feff00;"&gt;layers=show:3,27,28&lt;/STRONG&gt;&amp;amp;bbox=-7944379.251887456,5229071.73982415,-7941752.485181711,5231734.451758499&amp;amp;bboxSR=102100&amp;amp;imageSR=102100&amp;amp;size=950,963&amp;amp;f=image&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need to modify add something to my code snippet in order to request the only the layers that I need/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Neema&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Feb 2016 23:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/limiting-layers-on-a-map/m-p/121408#M766</guid>
      <dc:creator>NeemaGudur</dc:creator>
      <dc:date>2016-02-26T23:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting layers on a map</title>
      <link>https://community.esri.com/t5/developers-questions/limiting-layers-on-a-map/m-p/121409#M767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have the syntax wrong when you &lt;A href="https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#arcgisdynamicmapservicelayer1"&gt;construct&lt;/A&gt; the dynamic layer. You're using "ImageParameters" when you have to use "imageParameters&lt;STRONG&gt;". &lt;/STRONG&gt;Instead of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var dynamicMapServiceLayer = new EsriArcGISDynamicMapServiceLayer(oneLayer.url,{"&lt;STRONG&gt;ImageParameters&lt;/STRONG&gt;": imageParameters});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have to use this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var dynamicMapServiceLayer = new EsriArcGISDynamicMapServiceLayer(oneLayer.url,{"&lt;STRONG&gt;imageParameters&lt;/STRONG&gt;": imageParameters});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 14:08:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/limiting-layers-on-a-map/m-p/121409#M767</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2016-02-29T14:08:49Z</dc:date>
    </item>
  </channel>
</rss>

