<?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 Re: How to display WMS layer from Geoserver in ArcGIS Javascript API? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-display-wms-layer-from-geoserver-in-arcgis/m-p/686534#M63906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the information. It will be useful going forward.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Apr 2015 13:43:22 GMT</pubDate>
    <dc:creator>GeorgeReece_Jr_</dc:creator>
    <dc:date>2015-04-13T13:43:22Z</dc:date>
    <item>
      <title>How to display WMS layer from Geoserver in ArcGIS Javascript API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-display-wms-layer-from-geoserver-in-arcgis/m-p/686532#M63904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having trouble getting a WMS layer from my Geoserver to display in my ArcGIS test application. I'm just learning the ArcGIS Javascript API. For my test application, I started with the "WMS- resource info" sample&amp;nbsp; &lt;A href="https://developers.arcgis.com/javascript/jssamples/layers_wmsresourceinfo.html"&gt;https://developers.arcgis.com/javascript/jssamples/layers_wmsresourceinfo.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically replaced the WMS layer from the sample with my own:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var layer1 = new WMSLayerInfo({&lt;/P&gt;&lt;P&gt;name: 'testSave.0',&lt;/P&gt;&lt;P&gt;title: 'testSave.0'&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var resourceInfo = {&lt;/P&gt;&lt;P&gt;extent: new Extent(-120.77027961360123, 35.79776317148635, -120.74876891832204, 35.812242893139256, {&lt;/P&gt;&lt;P&gt;&amp;nbsp; wkid: 3857&lt;/P&gt;&lt;P&gt;}),&lt;/P&gt;&lt;P&gt;layerInfos: [layer1]&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var wmsLayer = new WMSLayer('&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:8040/geoserver/reproj/wms" rel="nofollow" target="_blank"&gt;http://localhost:8040/geoserver/reproj/wms&lt;/A&gt;&lt;SPAN&gt;', {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;resourceInfo: resourceInfo,&lt;/P&gt;&lt;P&gt;visibleLayers: ['testSave.0']&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;map.addLayers([wmsLayer]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run my application, I get the following error message when the WMS layer tries to load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN&gt;&amp;lt;ServiceExceptionReport xmlns="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.opengis.net/ogc" rel="nofollow" target="_blank"&gt;http://www.opengis.net/ogc&lt;/A&gt;&lt;SPAN&gt;" xmlns:xsi="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow" target="_blank"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;&lt;SPAN&gt;" version="1.3.0" xsi:schemaLocation="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.opengis.net/ogc" rel="nofollow" target="_blank"&gt;http://www.opengis.net/ogc&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:8040/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd" rel="nofollow" target="_blank"&gt;http://localhost:8040/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;lt;ServiceException code="InvalidCRS"&amp;gt;&lt;BR /&gt;Error occurred decoding the espg code urn:x-ogc:def:crs:EPSG:102100 No code "EPSG:102100" from authority "European Petroleum Survey Group" found for object of type "IdentifiedObject".&lt;BR /&gt;&amp;lt;/ServiceException&amp;gt;&lt;BR /&gt;&amp;lt;/ServiceExceptionReport&amp;gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem seems to be related to the spatial reference of the ESRI basemap (ESRI:102100) and my Geoserver's inability to process that spatial reference. I've tried changing the spatial reference of my layer (to EPSG:3857, which I believe is the EPSG equivalent to ESRI:102100). I've also tried adding ESRI:102100 as a custom CRS to my Geoserver, but it added it as EPSG:102100 which is not valid. And both attempts resulted in the same error message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know how I could get this layer to display in my application?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 15:07:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-display-wms-layer-from-geoserver-in-arcgis/m-p/686532#M63904</guid>
      <dc:creator>JasonCantrell</dc:creator>
      <dc:date>2015-04-08T15:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to display WMS layer from Geoserver in ArcGIS Javascript API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-display-wms-layer-from-geoserver-in-arcgis/m-p/686533#M63905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I found the answer myself from a previously answered question (&lt;A _jive_internal="true" href="https://community.esri.com/message/380733"&gt;https://community.esri.com/message/380733&lt;/A&gt;). It seems that you have to override the spatialReferences array of the WMSLayer object. Adding this line right before adding the layer to the map seems to do the trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wmsLayer.spatialReferences[0] = 3857;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked for a layer with spatial reference set to EPSG:4326, and for another layer that I had used a tool to reproject to ESPG:3857. I couldn't find how to add a ESRI spatial reference to my Geoserver, so this seemed to best way to work around it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 13:40:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-display-wms-layer-from-geoserver-in-arcgis/m-p/686533#M63905</guid>
      <dc:creator>JasonCantrell</dc:creator>
      <dc:date>2015-04-13T13:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to display WMS layer from Geoserver in ArcGIS Javascript API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-display-wms-layer-from-geoserver-in-arcgis/m-p/686534#M63906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the information. It will be useful going forward.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 13:43:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-display-wms-layer-from-geoserver-in-arcgis/m-p/686534#M63906</guid>
      <dc:creator>GeorgeReece_Jr_</dc:creator>
      <dc:date>2015-04-13T13:43:22Z</dc:date>
    </item>
  </channel>
</rss>

