../../_images/logo_mapbender.png ../../_images/OSGeo_project.png

Mapbender Quickstart

Mapbender is a web based geoportal framework to publish, register, view, navigate, monitor and grant secure access to spatial data infrastructure services.

You will need nothing but a standard web browser for this quickstart.

This Quick Start describes how to:

  • start Mapbender
  • create an application
  • load a Web Map Service (OGC WMS)
  • configure WMS
  • create an individual application
  • create a user and a group and assign applications to them

This is how a Mapbender application can look like:

../../_images/mapbender_screenshot.png

Installation

For the installation of Mapbender have a look at https://doc.mapbender.org/en/installation.html.

Start Mapbender

  1. Choose Geospatial ‣ Browser Clients ‣ Mapbender from the start menu or visit http://localhost/mapbender/app.php
  2. The application will take a few moments to start up

If you have any difficulties running Mapbender, please check whether your Apache web server and your PostgreSQL database are running. Or if you use SQLite as database whether you have write access to the file.

Start Mapbender in the developer mode app_dev.php

Symfony offers a developer mode with lot of information about your application (logging, exceptions, database queries, memory usage, time and more). This mode is only available from localhost.

../../_images/mapbender3_app_dev.png
  1. Start the developer mode: http://localhost/mapbender/app_dev.php
  2. Have a look at the information that is offered in the developer mode.
../../_images/mapbender3_symfony_profiler.png

Welcome page

  1. The Welcome page lists applications that are public and can be used by all users. The applications are listed with a screenshot, a title and a description.
  2. You can open an application by click on the title, the screenshot or the start button.
  3. Before you can administrate with Mapbender you have to login to get access to the administration.
  4. Click on Login at right-top to open the login page.
  5. You can login with the user that was generated on installation. It can be root and password root (This is the default user and password that you get after installation of Mapbender on OSGeoLive. Please change the root password if you want to run a productive environment. Please don’t delete the user root.).
../../_images/mapbender3_welcome.png

After successful login you are directed to the Mapbender administration.

Application overview

After the login you are directed to the Applications with a list of applications you are allowed to access.

The Application overview provides the following functionality:

  • title and description
  • screenshot for the application (if provided)
  • link to the application
  • button to duplicate the application
  • button to edit the application
  • button to publish/unpublish the application
  • button to delete the application
  • button to create a new application
  • with the filter textfield you can search for applications
../../_images/mapbender3_application_overview.png

Create an individual application

Create a new application by providing basic information about your application. After that you use the edit mode to add elements, layers and security.

  1. choose Applications ‣ New Application
  2. define a title and description for your application
  3. define an URL title which will be used in the URL to open the application. It can be the same as the title
  4. upload an image file as screenshot for the application overview
  5. choose a template for your application
  6. choose the button Create to create the application
  7. click the Edit-Button at the new application to edit the application
  8. your application is set up. Now you need a WMS to be displayed in your application. This will be described in the section WMS Management.
../../_images/mapbender3_create_application.png

Tip

Please note, that the style-, icon- and layout configuration has to be done in css- and twig-files at the moment. Read more about template generation at https://doc.mapbender.org/en/customization/templates.html.

Copy or rename an application

You also can create a new application by copying an existing application. Every application with write access can be copied. It provides a button to duplicate the application with all the services. The new application will get a derived name which can be changed in the next step.

Delete an application

You can delete an application from the menu item Applications with the x-button.

Export / Import applications and sources

You can export applications as JSON or YAML with Applications ‣ Export. You can choose one or more applications to export and you can also export the sources which are published in the applications.

../../_images/mapbender3_application_export.png

The exportfile contains all the definitions of the application/s (sources) and can be imported via Applications ‣ Import in another Mapbender3 installation or in the same installation.

../../_images/mapbender3_application_import.png

Management of Data Sources

Mapbender can handle OGC WMS. The administration provides an administration interface for the sources (at the moment only WMS).

Service Repository overview

  1. Go to Services and have a look at the Service repository.
  2. You get an overview on the Sources that are loaded in your Mapbender.
  3. Type, Title, Description offer first information about the services.
  4. On click on the button View-Button you get further information about the source.
  5. With the button Delete-Button you can delete the source from your repository.

Loading Web Map Services

You can load OGC Web Map Services (WMS) to your application.

A WMS returns an XML-file when the getCapabilities document is requested. This information is parsed by Mapbender and Mapbender gets all the necessary information about the service from this XML

Tip

You should first check the Capabilities document in your browser before you try to load it with Mapbender

  1. Choose menu item Services ‣ Add Service or use the +-Button. Link to the WMS getCapabilities URL in the text field Serviceurl.
  2. Enter username and password if your service needs authentication.
  3. Hit Load to load the Service to the repository.
  4. After successful registration of the service Mapbender will display an overview on the information that was provided by the service.
../../_images/mapbender3_wms_load.png

Here is a example WMS:

WhereGroup OSM WMS https://osm-demo.wheregroup.com/service?SERVICE=WMS&VERSION=1.3.0&REQUEST=getCapabilities

Add Service to Application

After the successful upload of a WMS you want to add your WMS to an application.

  1. Choose Applications ‣ edit-Button ‣ Layers ‣ Edit-Button.
  2. Click on the +-button to add a layerset, which represents a collection of layers (a possible name could be main)
  3. Now you can add layer to the layerset
  4. Click on the +-button at your new layerset to add a Service.
  5. You can change the order of the Services in your application by drag & drop.
../../_images/mapbender3_add_source_to_application.png

Configure your WMS

You can configure the WMS for your specific application. Maybe you don’t want to provide all layers or you want to change the order or titles of the layer or disable the feature info or change the maxscale for a layer.

  1. Choose Applications ‣ edit-Button ‣ Layers ‣ edit-Button to configure the Service Instance.
  2. You will see a table with the layers of the Service.
  3. You can change the order of the layers via drag & drop
../../_images/mapbender3_wms_application_settings.png

Service configuration

  • format - choose the format for getMap-Requests
  • infoformat - choose the format for getFeatureInfo-Requests
  • exceptionformat - choose the format for exceptions
  • opacity - choose opacity in percent
  • visible - default on. Service should be visible
  • basesource - activated for services that should be administrated by BaseSourceSwitcher
  • proxy - if active the service will be requested by Mapbender and not directly
  • transparency - default is active, the source is without a transparent background if it is deactivated (getMap-Request with TRANSPARENT=FALSE)
  • tiled - you can request a WMS in tiles, default is not tiled (may be a good choice if your map is very big and the WMS service does not support the width/height)
  • Layer ordering - layer ordering can get switched in the application
  • BBOX factor - This parameter is valid for non-tiled WMS services. You can specify the size of the returned map-image. A value greater than 1 will request a bigger map-image. Default: 1.25, can be set to 1.
  • tile buffer - This parameter is valid for tiles services and specifies if additional tiles should be requested. If the user pans the map, these tiles are already downloaded and visible. The higher the value the more tiles are requested. Default: 0

Layer configuration

  • title - layer title from Service information
  • active (on/off) - enable/disable a layer for this individual application
  • select on - selectable in geodata explorer
  • select allow - layer is active when the application starts
  • info on - layer provides feature info requests, info default activates the feature info functionality
  • info allow - feature info is possible for this layer
  • minscale / maxscale - the scale range in which the layer should be displayed, 0 means no scale limitation
  • toggle - open folder on start of the application
  • reorder - allows to reorder the layers with drag & drop while using the application
  • … -> opens a dialog with more information
  • name - layer name of the service information (for getMap-Requests)
  • style - if a WMS provides more than one style you can choose a different style than the default style

Add Elements to your application

Mapbender offers a set of elements. You can add the elements to your application. You have different regions (Toolbar, Sidepane, Content, Footer) to which you can add elements.

../../_images/mapbender3_application_add_element.png
  1. Choose Applications ‣ edit-Button ‣ Layers ‣ Button + to get an overview over the elements Mapbender3 provides.
  2. Choose an element from the list.
  3. Notice that you have different areas in your application. Make sure to add the element to a region that makes sense.
  4. Configure the element. Notice: When you select an element for example map you see that the element has a set of attributes. Each element offers individual attributes for configuration.
  5. You can change the position of the element via drag & drop
  6. Have a look at your application. Open your application from Applications ‣ Applications Overview

Now you should get an idea how easy it is to change a Mapbender application without changes in the code.

../../_images/mapbender3_application_elements.png

Examples for elements Mapbender offers:

  • Activity Indicator
  • BaseSourceSwitcher
  • Button
  • Coordinates Display
  • Coordinate Utility
  • Copyright
  • Feature Info
  • GPS-Position
  • HTML
  • Legend
  • Layertree - Table of Content
  • Map
  • Navigation Toolbar (Zoombar)
  • Overview
  • PrintClient
  • Redlining
  • Ruler Line/Area
  • Scale Selector
  • ScaleBar
  • SimpleSearch - Search via Solr
  • SearchRouter - Seach via SQL
  • SRS Selector
  • Spatial Reference System Selector (SRS Selector)
  • WMS Loader
  • WMC Editor
  • WMC Loader
  • WMC List

You find detailed information on every element in the Mapbender element documentation.

Try it yourself

  • add a Map Element to the content of your application
  • add a Layertree to the sidepane of your application
  • add a Legend to the sidepane of your application
  • add a print element to the content
  • add a button that opens the print to the top of your application
  • add the Navigation Toolbar to the content
  • add an overview map to the content
  • add a Copyright and change the copyright text
  • add a Scales Selector and an SRS Selector to the footer

User and group management

An access to Mapbender requires authentication. Only public applications can be used by everyone.

A user has permissions to access one or a set of applications and services.

Create a user

  1. To create a user go to New User or click the +-Button.
  2. Choose a name and a password for your user.
  3. Provide an email address for the user.
  4. Save your new user.
  5. You can provide more information about the user in the tab Profile.
../../_images/mapbender3_create_user.png

Create a group

  1. Create a group by New Group.
  2. Define a name and a description for your group.
  3. Save your new group.

Assign users to group

  1. Assign a user to a group by Users –> Groups.
  2. Choose one or more users you want to add to the group at Users.
  3. Assign a user by Users ‣ Edit-Button‣ Groups to a group.
../../_images/mapbender3_assign_user_to_group.png

Roles

Mapbender provides different rights. They refer to the Symfony ACL System http://symfony.com/doc/2.8/cookbook/security/acl_advanced.html#built-in-permission-map

  • view - Whether someone is allowed to view the object.
  • edit - Whether someone is allowed to make changes to the object.
  • delete - Whether someone is allowed to delete the object.
  • operator - Whether someone is allowed to perform all of the above actions.
  • master - Whether someone is allowed to perform all of the above actions, and in addition is allowed to grant any of the above permissions to others.
  • owner - Whether someone owns the object. An owner can perform any of the above actions and grant master and owner permissions.
  1. Assign roles to a user by Users ‣ Edit your User ‣ Security.
../../_images/mapbender3_roles.png

Assign an Application to a User/Group

  1. Edit your application by Application ‣ Edit-Button.
  2. Choose Security
  3. Set permission like view edit delete operator master owner
  4. Assign a user/group to the application
  5. Test your configuration!
  6. Logout from Mapbender by Logout.
  7. Login as the new user
../../_images/mapbender3_security.png

Things to try

Here are some additional challenges for you to try:

  1. Try to load some WMS in your application. Try to configure your WMS.
  2. Try to create an individual application.

What Next?

This is only the first step on the road to using Mapbender. There is a lot more functionality you can try.

Mapbender Website

You find tutorials at

Get involved in the project