如何显示WMS图层。如果服务器不是地理服务器

时间:2019-01-29 02:57:51

标签: openlayers arcgis geoserver

如果服务器不是Geoserver,如何显示WMS图层。

this link中的WMS URL为例。

2 个答案:

答案 0 :(得分:3)

**您可以使用ARCGIS网址显示该网址的图块层**

  

Openlayers 4.5

  var layers = [
    new ol.layer.Tile({
      source: new ol.source.OSM()
    }),
    new ol.layer.Tile({
      extent: [-13884991, 2870341, -7455066, 6338219],
      source: new ol.source.TileArcGISRest({
        url: https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer
      })
    })
  ];

答案 1 :(得分:0)

根据您的问题,这是您的WMS链接@antochoy:

http://portal.ina-sdi.or.id/arcgis/services/IGD/RupabumiIndonesia/MapServer/WMSServer?request=GetCapabilities&service=WMS

对于地图部分,请尝试以下操作(它有效,我仅将您的图层包括为“ 2”):

#include "misc/utilities.h"
#include <avr/io.h>
#include <util/delay.h>
#include <stdbool.h>
#include "USART/USART.h"
#include "ADC/ADC.h"

int main()
{
    ADCSettings* settings = NewADCSettings();
    settings->autoTrigger = false;
    settings->channel=ADC3;
    settings->clockDivider=CDSixtyFourth;
    settings->interruptEnable=false;
    settings->leftAdjust=false;
    settings->ref=AVCC;
    InitialiseADC(settings);
    while (true) 
    {
        int adcReading = GetADCConversion();
        Tx_Line(IntToString(adcReading));
        _delay_ms(100);
    }
}