如何在WMS请求中指定参数层?

时间:2014-05-23 11:25:26

标签: google-maps wms google-maps-engine

我想通过WMS访问我发布的Google Maps Engine地图。

我已经从地图详细信息中复制了链接。但我不知道参数层的外观如何?它的价值是什么?

作为价值,我尝试了图层的名称,但它似乎不起作用。 我得到的回答是“没有请求图层的数据” 我的图层名称中没有空格。

2 个答案:

答案 0 :(得分:2)

在已发布地图的OGC链接上运行GetCapabilities,它会告诉您图层名称。供参考:

<Layer queryable="0">
    <Name>15658084116283052074-10602818151822182906-4</Name>
    <Title>x</Title>
    <Abstract/>
    <CRS>EPSG:3857</CRS>
    <CRS>EPSG:3785</CRS>
    <CRS>EPSG:900913</CRS>
    <Layer queryable="0">
        <Name>15658084116283052074-00933023778830223306-4</Name>
        <Title>x</Title>
        <Abstract>Raster layer</Abstract>
        <CRS>EPSG:4326</CRS>
        <EX_GeographicBoundingBox>
          <westBoundLongitude>-100.00045742818516</westBoundLongitude>
          <eastBoundLongitude>-92.99988641904172</eastBoundLongitude>
          <southBoundLatitude>39.99928465598993</southBoundLatitude>
          <northBoundLatitude>47.00075398041749</northBoundLatitude>
        </EX_GeographicBoundingBox>
    </Layer>
</Layer>

我的网址看起来像这样:

https://mapsengine.google.com/15658084116283052074-10602818151822182906-4/wms/
?SERVICE=WMS
&REQUEST=GetMap
&VERSION=1.3.0
&LAYERS=15658084116283052074-10602818151822182906-4%2C15658084116283052074-00933023778830223306-4
&STYLES=
&FORMAT=image%2Fpng
&TRANSPARENT=true
&HEIGHT=256
&WIDTH=256
&CRS=EPSG%3A3857
&BBOX=-10644926.307106785,5361598.912035405,-10605790.548624776,5400734.670517417

答案 1 :(得分:0)

使用网络界面时,您还可以找到图层ID:

  1. 打开https://mapsengine.google.com/admin/
  2. 点击&#34;图层&#34;
  3. 单击要使用的图层
  4. 在网址中,会有一个&#39;援助&#39;参数(例如&amp; aid = 15658084116283052074-10602818151822182906) - 此数字(数字对)是图层的资产ID,即图层ID。