1

基本上,我希望以下示例http://openlayers.org/dev/examples/mapguide.html针对此 WMS 数据源“http://gis.aarhus.dk/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&” ;

到目前为止,我所做的只是更改网址。

   var url = "http://gis.aarhus.dk/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&";

我找到了以下在线文档http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapGuide-js.html但我不知道在哪里可以获得这些参数的正确值。

    var metersPerUnit = 111319.4908;  //value returned from mapguide
    var inPerUnit = OpenLayers.INCHES_PER_UNIT.m * metersPerUnit;
    OpenLayers.INCHES_PER_UNIT["dd"] = inPerUnit;
    OpenLayers.INCHES_PER_UNIT["degrees"] = inPerUnit;
    OpenLayers.DOTS_PER_INCH = 96;

        var extent = new OpenLayers.Bounds(-87.764987, 43.691398, -87.695522, 43.797520);
        var tempScales = [100000, 51794.74679, 26826.95795, 13894.95494, 7196.85673, 3727.59372, 1930.69773, 1000];

        var params = {
            mapdefinition: 'Library://Samples/Sheboygan/MapsTiled/Sheboygan.MapDefinition',
            basemaplayergroupname: "Base Layer Group"
        };

如何获得上述参数的正确值?

4

1 回答 1

0

您应该能够从 GetCapabilities 请求中获取有关 WMS 的信息,在您的情况下应该如下所示:

http://gis.aarhus.dk/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1

于 2011-08-03T07:25:03.493 回答