Я пытаюсь загрузить WMS на свою карту, вот так:
<html>
<head><title>OpenLayers WMS test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="http://openlayers.org/api/OpenLayers.js"></script>
<script>
function init() {
var map = new OpenLayers.Map("maparea");
var wms = new OpenLayers.Layer.WMS("TIRIS", "https://gis.tirol.gv.at/arcgis/services/Service_Public/oph05_wms/MapServer/WMSServer",
{format: 'image/jpeg',
bbox: '10.07,46,13.03,47.735',
layers: 'Orthophoto_Tirol_05m',
width: 256,
height: 256},
{projection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
maxExtent: new OpenLayers.Bounds(10.07,46,13.03,47.735)});
map.addLayer(wms);
map.zoomToMaxExtent();
alert("Request string: " + wms.getFullRequestString());
}
</script>
</head>
<body onload="init()">
<h1>WMS Test</h1>
<div id="maparea"></div>
</body>
</html>
Я не получаю ошибок в консоли Chrome и поэтому не знаю, куда идти дальше .. Если я открою ссылки на вкладке сети (например: https://gis.tirol.gv.at/arcgis/services/Service_Public/oph05_wms/MapServer/WMSServer?FORMAT=image%2Fjpeg&BBOX=11.55578125,46.864296875,11.558671875,46.8671875&LAYERS=Orthophoto_Tirol_05m&Relief=256&STARS&RELQUES=256&STARS&WIDTH=256&STREQUES=256&STARS&REL=256&STREQUES=256&STARS=256&RELQUES=EQUITY=256&STAR=256&REL;NOFOLLOW) У меня пустой экран ..
Вот живой пример: http://gimoya.bplaced.net/WMS_test.html
Заранее благодарим за любые указатели!
layers
(обычно). См. Здесь: view-source: dev.openlayers.org/examples/lite.html . - person lexicore   schedule 03.11.2014