Код: Выделить всё
var M4Azs = new OpenLayers.Layer.WMS("RoadLayer", "http://localhost:8080/geowebcache/service/wms?format=image/png", {transparent: 'true', layers: 'azs', format: 'png',TILED: 'true'});
Геоинформационные системы (ГИС) и Дистанционное зондирование Земли
Код: Выделить всё
var M4Azs = new OpenLayers.Layer.WMS("RoadLayer", "http://localhost:8080/geowebcache/service/wms?format=image/png", {transparent: 'true', layers: 'azs', format: 'png',TILED: 'true'});
Код: Выделить всё
var ClickLayer = new OpenLayers.Control.WMSGetFeatureInfo({
url: "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/example/wms - mezhuzl.map&",
layerUrls: "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/example/wms - mezhuzl.map&",
layers: [M4Azs],
queryVisible: true,
infoFormat: 'application/vnd.ogc.gml',
maxFeatures: 50,
autoActivate: true,
vendorParams: {
radius: 10
},
eventListeners: {
'getfeatureinfo': function(e) {
//alert(e.features[0].attributes['id']);
alert(e.text);
}
}
});
Код: Выделить всё
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
admin@example.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
Код: Выделить всё
"NetworkError: 500 Internal Server Error - http://localhost/cgi-bin/proxy.cgi?url=http%3A%2F%2Flocalhost%3A8080%2Fgeowebcache%2Fservice%2Fwms%3Fformat%3Dimage%2Fpng%26LAYERS%3Dazs%26QUERY_LAYERS%3Dazs%26STYLES%3D%26SERVICE%3DWMS%26VERSION%3D1.1.1%26REQUEST%3DGetFeatureInfo%26BBOX%3D1321918.952986%252C5206161.493394%252C7583640.309236%252C7686390.186846%26FEATURE_COUNT%3D50%26HEIGHT%3D5
Код: Выделить всё
http://localhost:8080/geowebcache/service/wms?format=image/png&LAYERS=azs&QUERY_LAYERS=azs&STYLES=&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=1321918.952986%2C5206161.493394%2C7583640.309236%2C7686390.186846&FEATURE_COUNT=50&HEIGHT=507&WIDTH=1280&FORMAT=png&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A900913&X=262&Y=163&RADIUS=10
Код: Выделить всё
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
Код: Выделить всё
alert(e.text);
Код: Выделить всё
var ClickLayer = new OpenLayers.Control.WMSGetFeatureInfo({
layerUrls: "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/example/wmsmezhuzl.map&",
layers: [M4Azs],
queryVisible: true,
infoFormat: 'application/vnd.ogc.gml',
maxFeatures: 50,
autoActivate: true,
vendorParams: {
radius: 10
},
eventListeners: {
'getfeatureinfo': function(e) {
alert(e.text);
}
}
});
Ну я только учусь:)Ну кто-же алертами дебажит
Код: Выделить всё
var ClickLayer = new OpenLayers.Control.WMSGetFeatureInfo({
// Url: "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/example/wmsmezhuzl.map&",
//layerUrls: "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/example/wmsmezhuzl.map&",
layers: [M4Azs],
queryVisible: true,
infoFormat: 'application/vnd.ogc.gml',
maxFeatures: 50,
autoActivate: true,
vendorParams: {
radius: 1000
},
eventListeners: {
'getfeatureinfo': function(e) {
console.log(e.features[0].attributes['id']);
}
}
});
Сейчас этот форум просматривают: нет зарегистрированных пользователей и 10 гостей
© GIS-Lab и авторы, 2002-2017. При использовании материалов сайта, ссылка на GIS-Lab и авторов обязательна. Содержание материалов - ответственность авторов (подробнее).