问题描述
基本上我想要以下示例来反对这个WMS数据源http://gis.aarhus.dk/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&;
Basically I want the following example http://openlayers.org/dev/examples/mapguide.html to worj against this WMS datasource "http://gis.aarhus.dk/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&";
到目前为止,我所做的只是更改网址。
All I have done so far is changing the url.
var url = "http://gis.aarhus.dk/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous&";
我发现以下在线文档但我不这样做知道从哪里获得这些参数的正确值。
I found the following online docs http://dev.openlayers.org/docs/files/OpenLayers/Layer/MapGuide-js.html but I dont know where to get the correct values for these parameters.
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"
};
如何获得上述参数的正确值?
How do I get the correct values for the above parameters?
推荐答案
您应该能够从GetCapabilities请求中获取有关WMS的信息,在您的情况下应该如下所示:
You should be able to get information about WMS from GetCapabilities request that in your case should look like this:
这篇关于如何将OpenLayers与MapGuide源一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!