Skip to main content
appended answer 260339 as supplemental
Source Link
Ian Turton
  • 83.2k
  • 6
  • 89
  • 189

I tested the WMS on this [enter link description here][1]enter link description here


Another try with Openlayers 4 and WMS from this site (https://www.geoportal-mv.de/portal/Geowebdienste/Fachthemen/Tourismus_und_Freizeit):

<!doctype html>
<html lang="de">
  <head>
    <link rel="stylesheet" href="https://openlayers.org/en/v4.4.2/css/ol.css" type="text/css">
<style>
  .map {
    height: 600px;
    width: 800px;
  }
</style>
<script src="https://openlayers.org/en/v4.4.2/build/ol.js" type="text/javascript"></script>
<title>OpenLayers example</title>
  </head>
  <body>
    <h2>My Map</h2>
<div id="map" class="map"></div>
<script type="text/javascript">
  var map = new ol.Map({
    target: 'map',
    layers: [
      new ol.layer.Tile({
        source: new ol.source.OSM()
      }),
      new ol.layer.Tile({
          extent: [-13884991, 2870341, -7455066, 6338219],
          source: new ol.source.TileWMS({
            url: 'https://ahocevar.com/geoserver/wms',
            params: {'LAYERS': 'topp:states', 'TILED': true},
            serverType: 'geoserver'
          })
        }),
    new ol.layer.Tile({
      extent: [33290156, 5948802, 33369558, 6001737],
      source: new ol.source.TileWMS({
        url: 'https://www.umweltkarten.mv-regierung.de/script/mv_a2_landplan_wms.php?',
        params: {
            'LAYERS': 't2_boden1',
            'FORMAT': 'image/png',
            'VERSION': '1.1.1',
            'SRS': 'EPSG:5650',
            'WIDTH': '300',
            'HEIGHT': '200'
        }
      })
    })
    ],
    view: new ol.View({
      center: ol.proj.fromLonLat([11.5, 53.9]), 
      zoom: 11
    })
  });
</script>

The WMS isn't visible on the map, the Image from WMS isn't empty. Maybe, anyone else can help!?

I tested the WMS on this [enter link description here][1]

I tested the WMS on this enter link description here


Another try with Openlayers 4 and WMS from this site (https://www.geoportal-mv.de/portal/Geowebdienste/Fachthemen/Tourismus_und_Freizeit):

<!doctype html>
<html lang="de">
  <head>
    <link rel="stylesheet" href="https://openlayers.org/en/v4.4.2/css/ol.css" type="text/css">
<style>
  .map {
    height: 600px;
    width: 800px;
  }
</style>
<script src="https://openlayers.org/en/v4.4.2/build/ol.js" type="text/javascript"></script>
<title>OpenLayers example</title>
  </head>
  <body>
    <h2>My Map</h2>
<div id="map" class="map"></div>
<script type="text/javascript">
  var map = new ol.Map({
    target: 'map',
    layers: [
      new ol.layer.Tile({
        source: new ol.source.OSM()
      }),
      new ol.layer.Tile({
          extent: [-13884991, 2870341, -7455066, 6338219],
          source: new ol.source.TileWMS({
            url: 'https://ahocevar.com/geoserver/wms',
            params: {'LAYERS': 'topp:states', 'TILED': true},
            serverType: 'geoserver'
          })
        }),
    new ol.layer.Tile({
      extent: [33290156, 5948802, 33369558, 6001737],
      source: new ol.source.TileWMS({
        url: 'https://www.umweltkarten.mv-regierung.de/script/mv_a2_landplan_wms.php?',
        params: {
            'LAYERS': 't2_boden1',
            'FORMAT': 'image/png',
            'VERSION': '1.1.1',
            'SRS': 'EPSG:5650',
            'WIDTH': '300',
            'HEIGHT': '200'
        }
      })
    })
    ],
    view: new ol.View({
      center: ol.proj.fromLonLat([11.5, 53.9]), 
      zoom: 11
    })
  });
</script>

The WMS isn't visible on the map, the Image from WMS isn't empty. Maybe, anyone else can help!?

removed help me
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

Can somebody help me?What am I doing wrong? I don't have to use Version 2 from OpenLayers! I need a simple local website to Show WMS as layer. Maybe there is a problem with projection...

Can somebody help me? I don't have to use Version 2 from OpenLayers! I need a simple local website to Show WMS as layer. Maybe there is a problem with projection...

What am I doing wrong? I don't have to use Version 2 from OpenLayers! I need a simple local website to Show WMS as layer. Maybe there is a problem with projection...

deleted 14 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Thanks!

Thanks!

Source Link
Loading