<?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: WMS Open BC Data - with ResourceInfo (Non Proxy) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552775#M51557</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying both MapServiceLayer and WMSLayer but no luck, tried with resource Info as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;var temp_wms = new ArcGISDynamicMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fopenmaps.gov.bc.ca%2Fgeo%2Fpub%2FWHSE_BASEMAPPING.FWA_STREAM_NETWORKS_SP%2Fows%3Fservice%3DWMS%26request%3DGetCapabilities" rel="nofollow" target="_blank"&gt;https://openmaps.gov.bc.ca/geo/pub/WHSE_BASEMAPPING.FWA_STREAM_NETWORKS_SP/ows?service=WMS&amp;amp;request=GetCapabilities&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; {&lt;BR /&gt; visibleLayers: [1]&lt;BR /&gt; }&lt;BR /&gt; ); &lt;BR /&gt; temp_wms.id = "bc data";&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;also tried this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;var temp_wms = new WMSLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fopenmaps.gov.bc.ca%2Fgeo%2Fpub%2FWHSE_BASEMAPPING.FWA_STREAM_NETWORKS_SP%2Fows%3Fservice%3DWMS%26request%3DGetCapabilities" rel="nofollow" target="_blank"&gt;https://openmaps.gov.bc.ca/geo/pub/WHSE_BASEMAPPING.FWA_STREAM_NETWORKS_SP/ows?service=WMS&amp;amp;request=GetCapabilities&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; {&lt;BR /&gt; visibleLayers: [1]&lt;BR /&gt; }&lt;BR /&gt; ); &lt;BR /&gt; temp_wms.id = "bc data";&lt;/P&gt;&lt;P&gt;map.addLayers([temp_wms]);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will post more as I go. note I am using 3.25 esri js&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2018 22:17:53 GMT</pubDate>
    <dc:creator>DouglasLong</dc:creator>
    <dc:date>2018-08-10T22:17:53Z</dc:date>
    <item>
      <title>WMS Open BC Data - with ResourceInfo (Non Proxy)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552774#M51556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;having trouble adding a WMS from BC open data, into my application that is not using a proxy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example layer is here on the BC government website.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://catalogue.data.gov.bc.ca/dataset/correctional-facilities/resource/cd463c9c-dcac-4f6c-ad9d-506923c1520c" title="https://catalogue.data.gov.bc.ca/dataset/correctional-facilities/resource/cd463c9c-dcac-4f6c-ad9d-506923c1520c"&gt;Correctional Facilities - WMS getCapabilities request - Data Catalogue&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this example works fine with the following code. however since their sandbox uses a proxy, it works fine and no 'ResourceInfo' object is needed.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;script&amp;gt; &lt;BR /&gt; var map;&lt;/P&gt;&lt;P&gt;require(["esri/map", "esri/layers/WMSLayer", "esri/config", "dojo/domReady!"],&lt;BR /&gt; function(Map, WMSLayer, esriConfig) {&lt;/P&gt;&lt;P&gt;esriConfig.defaults.io.proxyUrl = "/proxy/";&lt;BR /&gt; esriConfig.defaults.io.corsEnabledServers.push("openmaps.gov.bc.ca");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map = new Map("map", {&lt;BR /&gt; basemap: "streets",&lt;BR /&gt; center: [-98, 37],&lt;BR /&gt; zoom: 5&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var wmsLayer = new WMSLayer("&lt;A _jive_internal="true" href="https://community.esri.com/openmaps.gov.bc.ca/geo/pub/WHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV/ows" rel="nofollow" target="_blank"&gt;https://openmaps.gov.bc.ca/geo/pub/WHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV/ows&lt;/A&gt;", {&lt;BR /&gt; format: "png",&lt;BR /&gt; visibleLayers: [0]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.addLayer(wmsLayer);&lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however in my application this simply won't work, as I don't have a proxy. I am a bit clueless what I should add for resource info and have tried many other combinations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone have any luck with this?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2018 20:06:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552774#M51556</guid>
      <dc:creator>DouglasLong</dc:creator>
      <dc:date>2018-08-08T20:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Open BC Data - with ResourceInfo (Non Proxy)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552775#M51557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying both MapServiceLayer and WMSLayer but no luck, tried with resource Info as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;var temp_wms = new ArcGISDynamicMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fopenmaps.gov.bc.ca%2Fgeo%2Fpub%2FWHSE_BASEMAPPING.FWA_STREAM_NETWORKS_SP%2Fows%3Fservice%3DWMS%26request%3DGetCapabilities" rel="nofollow" target="_blank"&gt;https://openmaps.gov.bc.ca/geo/pub/WHSE_BASEMAPPING.FWA_STREAM_NETWORKS_SP/ows?service=WMS&amp;amp;request=GetCapabilities&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; {&lt;BR /&gt; visibleLayers: [1]&lt;BR /&gt; }&lt;BR /&gt; ); &lt;BR /&gt; temp_wms.id = "bc data";&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;also tried this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN&gt;var temp_wms = new WMSLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fopenmaps.gov.bc.ca%2Fgeo%2Fpub%2FWHSE_BASEMAPPING.FWA_STREAM_NETWORKS_SP%2Fows%3Fservice%3DWMS%26request%3DGetCapabilities" rel="nofollow" target="_blank"&gt;https://openmaps.gov.bc.ca/geo/pub/WHSE_BASEMAPPING.FWA_STREAM_NETWORKS_SP/ows?service=WMS&amp;amp;request=GetCapabilities&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; {&lt;BR /&gt; visibleLayers: [1]&lt;BR /&gt; }&lt;BR /&gt; ); &lt;BR /&gt; temp_wms.id = "bc data";&lt;/P&gt;&lt;P&gt;map.addLayers([temp_wms]);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will post more as I go. note I am using 3.25 esri js&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 22:17:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552775#M51557</guid>
      <dc:creator>DouglasLong</dc:creator>
      <dc:date>2018-08-10T22:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Open BC Data - with ResourceInfo (Non Proxy)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552776#M51558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, when I run it with resource Info I continuously get the same error.&lt;/P&gt;&lt;P&gt;I went to the sandbox for the WMS layer, and I can load it no problem, just not in my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/418517_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var layer1 = new WMSLayerInfo({&lt;BR /&gt; name: 'pub:WHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV',&lt;BR /&gt; title: "DataBC Public Web Map Service"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var resourceInfo = {&lt;BR /&gt; extent: new Extent(-139.0522011144567, 47.632141441632584, -110.42769916022715, 60.59852435568218, {&lt;BR /&gt; wkid: 4326&lt;BR /&gt; }),&lt;BR /&gt; layerInfos: [layer1],&lt;BR /&gt; copyright: "NONE",&lt;BR /&gt; description: "A compliant implementation of WMS plus most of the SLD extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS",&lt;BR /&gt; featureInfoFormat: "text/html",&lt;BR /&gt;&lt;SPAN&gt; getFeatureInfoURL: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fopenmaps.gov.bc.ca%2Fgeo%2Fpub%2FWHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV%2Fows" rel="nofollow" target="_blank"&gt;https://openmaps.gov.bc.ca/geo/pub/WHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV/ows&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; getMapURL: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fopenmaps.gov.bc.ca%2Fgeo%2Fpub%2FWHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV%2Fows" rel="nofollow" target="_blank"&gt;https://openmaps.gov.bc.ca/geo/pub/WHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV/ows&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; spatialReferences: [3857, 4326],&lt;BR /&gt; version: "1.3.0"&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var temp_wms = new WMSLayer('&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fopenmaps.gov.bc.ca%2Fgeo%2Fpub%2FWHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV%2Fows" rel="nofollow" target="_blank"&gt;https://openmaps.gov.bc.ca/geo/pub/WHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV/ows&lt;/A&gt;&lt;SPAN&gt;', {&lt;/SPAN&gt;&lt;BR /&gt; resourceInfo: resourceInfo,&lt;BR /&gt; visibleLayers: ["pub:WHSE_IMAGERY_AND_BASE_MAPS.GSR_CORRECTNL_FACILITIES_SV"],&lt;BR /&gt; format: "png"&lt;BR /&gt; });&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 22:40:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552776#M51558</guid>
      <dc:creator>DouglasLong</dc:creator>
      <dc:date>2018-08-10T22:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: WMS Open BC Data - with ResourceInfo (Non Proxy)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552777#M51559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright. this was dumb. I am using ESRI Identity Manager to register my (NODE JS/Express) generated token.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after registering the Arc Server I am using, it adds the following to my list of cors enabled servers. "null/undefined".&lt;/P&gt;&lt;P&gt;anyways long story short, just loop the array of cors enabled servers, and remove the "null/undefined" item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my code.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;MapURL = sesh_inf.SERVER_URL + 'arcgis/rest/services';&lt;/P&gt;&lt;P&gt;IdentityManager.registerToken({&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;server: MapURL,&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;token: sesh&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var a = esriConfig.defaults.io.corsEnabledServers.indexOf("null://undefined");&lt;BR /&gt; if (a &amp;gt; -1) {&lt;BR /&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;esriConfig.defaults.io.corsEnabledServers&lt;A&gt; = "&lt;/A&gt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Flocalhost%3A1337" rel="nofollow" target="_blank"&gt;http://localhost:1337&lt;/A&gt;&lt;SPAN&gt;";&lt;/SPAN&gt;&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2018 17:47:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wms-open-bc-data-with-resourceinfo-non-proxy/m-p/552777#M51559</guid>
      <dc:creator>DouglasLong</dc:creator>
      <dc:date>2018-08-13T17:47:39Z</dc:date>
    </item>
  </channel>
</rss>

