nathan-gs / ha-map-card

A Map Card for Home Assistant
https://community.home-assistant.io/t/map-card-a-slightly-improved-map-card/693088
MIT License
19 stars 4 forks source link

Help for wms server from vlaanderen.be #3

Closed hensjl closed 4 months ago

hensjl commented 4 months ago

Very good job Nathan. Easy to use and fast to load. Thank you.

This one is working:

type: custom:map-card
title: Ferraris 1777
zoom: 16
card_size: 10
wms:
  - url: >-
      https://geoservices.wallonie.be/arcgis/services/CARTES_ANCIENNES/FERRARIS/MapServer/WmsServer
    options:
      layers: 0
      transparent: true
      format: image/png
      opacity: 0.7
      tiled: true
      attribution: <a href="http://geoportail.wallonie.be/">wallonie.be</a>
tile_layer_url: https://basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png
tile_layer_attribution: >-
  &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>,
  &copy; <a href="https://carto.com/attributions">CARTO</a>
entities:
  - entity: zone.car

in my QGis it is working like this

Name    WAL 1777 Ferraris
URL https://geoservices.wallonie.be/arcgis/services/CARTES_ANCIENNES/FERRARIS/MapServer/WmsServer
Source  crs=EPSG:3857&dpiMode=7&format=image/png&layers=0&styles&url=https://geoservices.wallonie.be/arcgis/services/CARTES_ANCIENNES/FERRARIS/MapServer/WmsServer
Provider    wms

But I can't get the same histocal map from vlaanderen.be to work. It is working in my QGis like this

Name    VLG 1777 Ferraris
URL https://geo.api.vlaanderen.be/HISTCART/wmts
Source  crs=EPSG:4326&dpiMode=7&format=image/png&layers=ferraris&styles=&tileMatrixSet=WGS84VL&url=https://geo.api.vlaanderen.be/HISTCART/wmts
Provider    wms

Any idea ? maybe wmts ?

nathan-gs commented 4 months ago

WMTS is not WMS.

Some vlaanderen.be datasets are available as WMS, maybe this one as well? https://metadata.vlaanderen.be/k8s/api/records/10a61124-ef79-d4f7-07fd-252e-10b7-5aa3-a38d5f8e https://www.geopunt.be/?service=https%3A%2F%2Fgeo.api.vlaanderen.be%2Fhistcart%2Fwms%3Flayers%3Dferraris

I'm currently adding multi tile layer support, it might work with that, but some experiments are needed.

hensjl commented 4 months ago

Thank you

replaced https://geo.api.vlaanderen.be/HISTCART/wmts by https://geo.api.vlaanderen.be/histcart/wms

And the two are working together very well.

type: custom:map-card
title: Ferraris 1777
zoom: 8
card_size: 10
wms:
  - url: https://geo.api.vlaanderen.be/histcart/wms
    options:
      layers: ferraris
      format: image/png
      opacity: 0.7
      tiled: true
      attribution: <a href="https://www.vlaanderen.be/">vlaanderen.be</a>
  - url: >-
      https://geoservices.wallonie.be/arcgis/services/CARTES_ANCIENNES/FERRARIS/MapServer/WmsServer
    options:
      layers: 0
      transparent: true
      format: image/png
      opacity: 0.7
      tiled: true
      attribution: <a href="http://geoportail.wallonie.be/">wallonie.be</a>
tile_layer_url: https://basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png
tile_layer_attribution: >-
  &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>,
  &copy; <a href="https://carto.com/attributions">CARTO</a>
entities:
  - entity: zone.car