YAML Config: Mapbender Sources (WMS, WMTS, Vector Tiles)

by Rajiv Sharma 57 views

Hey guys! Let's dive into documenting YAML configurations for sources in Mapbender. Currently, we've got solid documentation for elements in YAML, but the source configurations are a bit of a blind spot. This article will shed some light on how to configure various source types in Mapbender using YAML. We'll cover WMS, WMTS, and Vector Tiles, giving you the lowdown on each.

Why YAML Configuration Matters

Before we get into the specifics, let’s quickly touch on why YAML configuration is so crucial for Mapbender. YAML, which stands for "YAML Ain't Markup Language," is a human-readable data serialization format. This means it's designed to be easily read and written by humans, making it ideal for configuration files. In Mapbender, YAML is used to define various aspects of your application, including the sources that provide the map data.

Using YAML for configuration offers several key advantages:

  • Readability: YAML’s clean syntax makes it easy to understand the structure and settings of your configuration.
  • Maintainability: Because YAML is human-readable, it’s easier to maintain and update your configurations over time.
  • Version Control: YAML files are text-based, which means they play nicely with version control systems like Git. This makes it simple to track changes and collaborate with others.
  • Flexibility: YAML supports complex data structures, allowing you to define intricate configurations for your Mapbender application.

By documenting the YAML configuration for sources, we empower users to harness the full potential of Mapbender, creating robust and customized mapping applications. So, let’s jump into the specifics and start exploring the YAML configurations for different source types.

WMS Configuration

Let's kick things off with WMS (Web Map Service). WMS is a standard protocol for serving georeferenced map images over the internet. Configuring WMS sources in Mapbender via YAML allows you to integrate a wide range of map data into your application. Here's a breakdown of the YAML parameters for WMS sources:

  • type: Must be wms. This tells Mapbender that you're configuring a WMS source.
  • title: The source title as displayed in the layer tree. This is the name users will see in the Mapbender interface, so make it descriptive and user-friendly.
  • version: WMS version (default: 1.1.1). Specify the WMS version your service uses. Common versions are 1.1.1 and 1.3.0.
  • url: URL to the service's GetCapabilities XML. This is the endpoint that provides metadata about the WMS service, such as available layers and supported formats.
  • format: Mime type for the image format requested (default: image/png). This defines the image format Mapbender will request from the WMS service. Common formats include image/png, image/jpeg, and image/gif.
  • info_format: Mime type for the feature info format (default: text/html). This specifies the format for feature information requests. Common formats are text/html, text/plain, and application/json.
  • proxy: Bool value whether the service should be proxied (default: false). If set to true, Mapbender will proxy requests to the WMS service, which can be useful for handling CORS issues or adding authentication.
  • tiled: Bool value whether the WMS data should be requested as tiles (default: false). Tiled requests can improve performance for large datasets by breaking them into smaller chunks.
  • layerorder: `