Select to view content in your preferred language

Use OGC WMS layers in startupLayers

770
2
Jump to solution
03-06-2023 09:11 AM
GeoffroyRicher-Lalonde
Frequent Contributor

Hello,

With the release of ArcGIS Earth 1.18, some corrections have been made for the support of OGC WMS layers. The users can now add individual layers that are grouped in the OGC WMS. This is great news!

But I still cannot find the way to use OGC WMS layers in startupLayers. The ArcGIS Earth Sample Configuration File only shows how to add ArcGIS Server WMS :

   <layer name="" type="WMS" url=http://myservername.esri.com/someservice/servicename/MapServer/WMSServer visible="True" icon="c:\test.jpg">
      <layer name="sub-layer-1" title="sub layer 1"/>
      <layer name="sub-layer-2" title="sub layer 2"/>
   </layer>

But how can I use OGC WMS layers as startupLayers? Is it possible? I tried many things, but either my OGC WMS layers are broken, either my whole startupLayers group is not showing.

Thank you!

Geoffroy Richer-Lalonde
GIS Specialist, Hydro-Québec
0 Kudos
1 Solution

Accepted Solutions
Sharon_MU
Esri Contributor

Hi @GeoffroyRicher-Lalonde ,

Thank you for the feedback !

Great to see you're experiencing the new enhancement of adding WMS layers !

OGC WMS layers are still well supported in startupLayers.  I made a sample of WMS startup layers,  it works on my side. Just copy it into your configuration file.  Try it and feel free to let me know if any questions.

 

<group name="My Testing" state="visible">

    <layer name="All Layers" type="WMS" url="https://geoegl.msp.gouv.qc.ca/ws/inondation2019.fcgi" state="visible" />

    <layer name="Several Layers" type="WMS" url="https://geoegl.msp.gouv.qc.ca/ws/inondation2019.fcgi?request=getcapabilities&amp;service=wms" state="visible">
        <layer name="Inondations2019/Observations" title="Inondations 2019/Observations" />
        <layer name="Inon2019_EauLibre_20190516_HautPontiac_Radarsat2" title="2019/05/16 - Eau libre - Haut Pontiac - Radarsat2" />
    </layer>

</group>

 

 

In ArcGIS Earth, it looks like this:

Sharon_MU_0-1678701265563.png

 

In this sample, there are mainly 2 ways of adding WMS layers.  The first way is to simply add all the layer included in this WMS server,  the second one is to add specific layers/layer groups from this WMS server.

Please be noted that both name and title are necessary parameters for correctly query the specific layers or layer groups.

For the WMS server URL,  you can either use WMS server URL  or complete query URL,  but do not include "&" , please use "&amp;" instead.  Either of the following URLs work:

`https://geoegl.msp.gouv.qc.ca/ws/inondation2019.fcgi`

 
Please let me know your findings and further question if any.  🙂
 
Have fun.
 
Sharon Mu
 

View solution in original post

2 Replies
Sharon_MU
Esri Contributor

Hi @GeoffroyRicher-Lalonde ,

Thank you for the feedback !

Great to see you're experiencing the new enhancement of adding WMS layers !

OGC WMS layers are still well supported in startupLayers.  I made a sample of WMS startup layers,  it works on my side. Just copy it into your configuration file.  Try it and feel free to let me know if any questions.

 

<group name="My Testing" state="visible">

    <layer name="All Layers" type="WMS" url="https://geoegl.msp.gouv.qc.ca/ws/inondation2019.fcgi" state="visible" />

    <layer name="Several Layers" type="WMS" url="https://geoegl.msp.gouv.qc.ca/ws/inondation2019.fcgi?request=getcapabilities&amp;service=wms" state="visible">
        <layer name="Inondations2019/Observations" title="Inondations 2019/Observations" />
        <layer name="Inon2019_EauLibre_20190516_HautPontiac_Radarsat2" title="2019/05/16 - Eau libre - Haut Pontiac - Radarsat2" />
    </layer>

</group>

 

 

In ArcGIS Earth, it looks like this:

Sharon_MU_0-1678701265563.png

 

In this sample, there are mainly 2 ways of adding WMS layers.  The first way is to simply add all the layer included in this WMS server,  the second one is to add specific layers/layer groups from this WMS server.

Please be noted that both name and title are necessary parameters for correctly query the specific layers or layer groups.

For the WMS server URL,  you can either use WMS server URL  or complete query URL,  but do not include "&" , please use "&amp;" instead.  Either of the following URLs work:

`https://geoegl.msp.gouv.qc.ca/ws/inondation2019.fcgi`

 
Please let me know your findings and further question if any.  🙂
 
Have fun.
 
Sharon Mu
 
GeoffroyRicher-Lalonde
Frequent Contributor

Thanks a lot for your help and all the detailed information @Sharon_MU ! 

I was using "&" instead of "&amp;" , and that was the problem.

Geoffroy Richer-Lalonde
GIS Specialist, Hydro-Québec
0 Kudos