Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ MultiPolygon
NDK
NMEA
NTRIP
OAPIF
OGC
OGR
Ok
Expand Down
2 changes: 1 addition & 1 deletion src/.vitepress/sidebar/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default {
{ text: 'How to Enable Digitising', link: '/gis/enable_digitising/' },
{ text: 'How to Set Up Snapping for Mergin Maps Mobile App', link: '/gis/snapping/' },
{ text: 'How to Avoid Polygons Overlap', link: '/gis/avoid-overlap/' },
{ text: 'Publishing Projects via OGC API (WMS/WMTS, WFS)', link: '/gis/ogc-api/' },
{ text: 'Publishing Projects via OGC API (WMS/WMTS, WFS, OGC API - Features)', link: '/gis/ogc-api/' },
{ text: 'Custom Projections', link: '/gis/proj/' },
{ text: 'Supported Formats', link: '/gis/supported_formats/' }
] },
Expand Down
Binary file modified src/gis/ogc-api/dashboard-project-ogc-api-enabled.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/gis/ogc-api/dashboard-project-ogc-api-enabled.xcf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
138 changes: 99 additions & 39 deletions src/gis/ogc-api/index.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,142 @@
---
description: Your Mergin Maps project data can be published via OGC API as WMS / WMTS or WFS.
description: Your Mergin Maps project data can be published via OGC API as WMS / WMTS, WFS or OGC API - Features.

outline: deep
---

# Publishing Projects via OGC API (WMS/WMTS, WFS)
# Publishing Projects via OGC API (WMS/WMTS, WFS, OGC API - Features)
[[toc]]

Your project data can be published using OGC API as WMS / WMTS or WFS. This way, your data can be displayed (read-only) in other software or web applications.
You can publish your project data via OGC API as *WMS / WMTS*, *WFS* or *OGC API - Features*. This allows other software or web applications to display your data (read-only).

::: tip Early access feature
OGC API read-only access is one of the early access program features. It needs to be enabled for your workspace so you can try it out.
OGC API read-only access is one of the early access program features. To use this feature, you must first enable it for your workspace.
:::

## Enabling OGC API access
As early access feature, OGC API has to be enabled for your workspace:

As an early access feature, OGC API has to be enabled for your workspace:
1. Navigate to the **Settings** tab on the <DashboardShortLink />
2. Make sure that the *OGC API read-only access* feature is enabled
2. Ensure the *OGC API read-only access* feature is enabled

![Enabling OGC API access for Mergin Maps workspace](./dashboard-settings-ogc-api-enabled.webp "Enabling OGC API access for Mergin Maps workspace")

Now you can enable OGC API access for your <MainPlatformName /> project:
![Enabling OGC API access for Mergin Maps project](./dashboard-project-ogc-api-enabled.webp "Enabling OGC API access for Mergin Maps project")
## OGC API project setup
To publish a project via OGC API:
1. Set up the QGIS Server parameters for your project [in QGIS](#setup-wms-wmts-and-wfs-properties-in-qgis)
2. Enable OGC API access at the project level [on the dashboard](#ogc-api-for-a-project)

### Set up WMS, WMTS and WFS properties in QGIS {#setup-wms-wmts-and-wfs-properties-in-qgis}
In QGIS, you can specify which layers from your project will be published via *WMS/WMTS*, *WFS* and *OGC API - Features*.

Open your project and navigate to the **QGIS Server** tab in **Project Properties**:
- in the **Service Capabilities** tab, you can (optionally) *enable Service Capabilities* and define the *title* and other metadata of your service
- define [WMS/WMTS properties](#wms-wmts-properties) in the **WMS** and **WMTS** tabs
- define [WFS and OGC API - Features properties](#wfs-and-ogc-api-features-properties) in the **WFS/OAPIF** tab

![QGIS Project Properties QGIS Server Capabilities](./qgis-project-properties-qgis-server-capabilities.webp "QGIS Project Properties QGIS Server Capabilities")

After making changes, remember to save and synchronise your project.

#### WMS/WMTS properties
Define layers for *WMS/WMTS* publication in the **WMS** and **WMTS** tabs of **QGIS Server Project Properties**.

In the **WMS** tab, you can add or remove layers that will be **excluded** from publishing.

![QGIS Project Properties QGIS Server WMS](./qgis-project-properties-qgis-server-wms.webp "QGIS Project Properties QGIS Server WMS")

**WFS URL** and **WMS / WMTS URL** can be copied and used, e.g., to [connect to these services in QGIS](#example-wms-wmts-and-wfs-connection-in-qgis).
In the **WMTS** tab, you can select the layers to be :white_check_mark: **published**.

OGC API access can be disabled at any time. Re-enabling it will restore the same URLs. To regenerate your URLs, [contact our support team](mailto:support@merginmaps.com).
![QGIS Project Properties QGIS Server WMS](./qgis-project-properties-qgis-server-wmts.webp "QGIS Project Properties QGIS Server WMS")

## Setup WMS, WMTS and WFS properties in QGIS
In QGIS, you can define which layers and fields from your project should be published via WMS/WMTS and WFS.

Explore the **QGIS server** tab in **Project Properties**:
- in the **Service Capabilities** tab, you can (optionally) define the *title* and other metadata of your service
- in the **WMTS** and **WFS** tabs, select the layers that should be published
#### WFS and OGC API - Features properties
In the **WFS/OAPIF** tab of **QGIS Server Project Properties**, specify the :white_check_mark: **published** layers from the list. These layers will be published via *WFS* or *OGC API - Features*.

![QGIS server tab in Project Properties](./qgis-project-properties-qgis-server.webp "QGIS server tab in Project Properties")

There may be some fields that you do not want to publish. These can be defined in the **Layer Properties** in the **Fields** tab for each field of the layer:
If a published layer contains fields you do not want to publish, navigate to the **Fields** tab of **Layer Properties** and check the **Do not expose via WMS/WFS** option for each of these field.

![Layer Properties do not expose fields via WMS and WFS](./qgis-layer-properties-fields.webp "Layer Properties do not expose fields via WMS and WFS")

Save and synchronise the project.

## Example WMS/WMTS and WFS connection in QGIS
[WFS URL and WMS/WMTS URL](#enabling-ogc-api-access) from the dashboard can be used to load the web services to any software that supports WFS and/or WMS (for example QGIS) to display the project data.
### OGC API for a project

### WMS/WMTS connection
WMS/WMTS can be connected to QGIS in the **Browser** panel:
After enabling OGC API access for your [workspace](#enabling-ogc-api-access), you can enable it for your <MainPlatformName /> projects.

1. Go to the **Project** tab on the <DashboardShortLink /> and open your project

2. In the **Settings & API** tab, you can enable or disable OGC API Access

![Enabling OGC API access for Mergin Maps project](./dashboard-project-ogc-api-enabled.webp "Enabling OGC API access for Mergin Maps project")

You can copy the **WFS URL**, **WMS / WMTS URL** and **OGC API - Features URL** to connect these services to other software or web applications, such as [QGIS](#example-wms-wmts-and-wfs-connection-in-qgis).

OGC API access can be **disabled** at any time. Re-enabling it will restore the same URLs.

1. Right-click on the **WMS/WMTS** entry and select **New Connection...**
#### Regenerating OGC API URLs

![QGIS Browser Panel New WMS/WMTS connection](./qgis-browser-new-wms-connection.webp "QGIS Browser Panel New WMS/WMTS connection")
If necessary, you can invalidate existing access and generate new URLs by clicking the **Regenerate OGC API URLs** button.

2. Fill in the connection details:
![Regenerate Mergin Maps OGC API URLs](./dashboard-project-ogc-api-regenerate-urls.webp "Regenerate Mergin Maps OGC API URLs")

Keep in mind that any applications or services that use the old URLs will lose access immediately and must be updated with the new URLs.

## Example connections in QGIS {#example-wms-wmts-and-wfs-connection-in-qgis}
Use the [WFS, WMS/WMTS and OGC API - Features URLs](#enabling-ogc-api-access) from the dashboard to load web services to any software that supports them.

The following sections demonstrate how to display these services in QGIS.

### WMS/WMTS connection
Connect to *WMS/WMTS* in QGIS via the **Browser** panel:

1. Right-click the **WMS/WMTS** entry and select **New Connection...**
![QGIS Browser Panel New WMS/WMTS connection](./qgis-browser-new-wms-connection.webp "QGIS Browser Panel New WMS/WMTS connection")

2. Provide the connection details:
- **Name**
- **URL** - enter the URL copied from the <DashboardLink />
- set **WMS DPI-Mode** to *QGIS*
- select following options:
- **URL** - enter the URL copied from the [dashboard](#enabling-ogc-api-access)
- set **WMS DPI-Mode** to **QGIS**
- select the following options:
- :white_check_mark: <NoSpellcheck id="Ignore GetMap/GetTile/GetLegendGraphic URI reported in capabilities" />
- :white_check_mark: <NoSpellcheck id="Ignore GetFeatureInfo URI reported in capabilities" />
- :white_check_mark: <NoSpellcheck id="Ignore reported layer extents" />

![QGIS New WMS/WMTS connection](./qgis-browser-wms-connection.webp "QGIS New WMS/WMTS connection")
![QGIS New WMS/WMTS connection](./qgis-browser-wms-connection.webp "QGIS New WMS/WMTS connection")

3. Published layers from your project should now be displayed in the Browser panel and can be added to the project.
![QGIS connected WFS layers](./qgis-browser-wms.webp "QGIS connected WFS layers")
3. Published layers will now appear in the Browser panel and can be added to your project.
![QGIS connected WFS layers](./qgis-browser-wms.webp "QGIS connected WFS layers")

### WFS connection
WMS/WMTS can be connected to QGIS in the **Browser** panel:
Connect to *WFS* in QGIS via the **Browser** panel:

1. Right-click on the **WFS/OGC API - Features** entry and select **New Connection...**
![QGIS Browser Panel New WFS connection](./qgis-browser-new-wfs-connection.webp "QGIS Browser Panel New WFS connection")
1. Right-click the **WFS/OGC API - Features** entry and select **New Connection...**
![QGIS Browser Panel New WFS/OGC API Features connection](./qgis-browser-new-wfs-connection.webp "QGIS Browser Panel New WFS/OGC API Features connection")

2. Fill in the connection details:
2. Provide the connection details:
- **Name**
- **URL** - enter the URL copied from the <DashboardLink />
- **Version** - use the **Detect** button or select the value **1.1** from the list
![QGIS New WFS connection](./qgis-browser-wfs-connection.webp "QGIS New WFS connection")
- **URL** - enter the URL copied from the [dashboard](#enabling-ogc-api-access)
- **Version** - click **Detect** or select **1.1** from the list

![QGIS New WFS/OGC API Features connection](./qgis-browser-wfs-connection.webp "QGIS New WFS/OGC API Features connection")

3. Published layers from will now appear in the Browser panel and can be added to your project.
![QGIS connected WFS layers](./qgis-browser-wfs.webp "QGIS connected WFS layers")


### OGC API - Features connection
Connect to *OGC API - Features* in QGIS via the **Browser** panel:

1. Right-click the **WFS/OGC API - Features** entry and select **New Connection...**
![QGIS Browser Panel New WFS/OGC API Features connection](./qgis-browser-new-wfs-connection.webp "QGIS Browser Panel New WFS/OGC API Features connection")

2. Provide the connection details:
- **Name**
- **URL** - enter the URL copied from the [dashboard](#enabling-ogc-api-access)
- **Version** - select **OGC API - Features** from the list

![QGIS New WFS/OGC API Features connection](./qgis-browser-ogc-features-connection.webp "QGIS New WFS/OGC API Features connection")

3. Published layers from your project should now be displayed in the Browser panel and can be added to the project.
![QGIS connected WFS layers](./qgis-browser-wfs.webp "QGIS connected WFS layers")
3. Published layers will now appear in the Browser panel and can be added to your project.
![QGIS connected OGC API Features layers](./qgis-browser-wfs-ogc-api.webp "QGIS connected OGC API Features layers")

Binary file modified src/gis/ogc-api/qgis-browser-new-wfs-connection.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/gis/ogc-api/qgis-browser-new-wfs-connection.xcf
Binary file not shown.
Binary file modified src/gis/ogc-api/qgis-browser-new-wms-connection.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/gis/ogc-api/qgis-browser-new-wms-connection.xcf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified src/gis/ogc-api/qgis-browser-wfs-connection.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/gis/ogc-api/qgis-browser-wfs-connection.xcf
Binary file not shown.
Binary file added src/gis/ogc-api/qgis-browser-wfs-ogc-api.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/gis/ogc-api/qgis-browser-wfs-ogc-api.xcf
Binary file not shown.
Binary file modified src/gis/ogc-api/qgis-browser-wfs.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/gis/ogc-api/qgis-browser-wfs.xcf
Binary file not shown.
Binary file modified src/gis/ogc-api/qgis-browser-wms-connection.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/gis/ogc-api/qgis-browser-wms-connection.xcf
Binary file not shown.
Binary file modified src/gis/ogc-api/qgis-browser-wms.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/gis/ogc-api/qgis-browser-wms.xcf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified src/gis/ogc-api/qgis-project-properties-qgis-server.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/gis/ogc-api/qgis-project-properties-qgis-server.xcf
Binary file not shown.
1 change: 1 addition & 0 deletions src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The ecosystem consist of various components:
- [How to Enable Digitising](./gis/enable_digitising/)
- [How to Set Up Snapping for <MobileAppName />](./gis/snapping/)
- [How to Avoid Polygons Overlap](./gis/snapping/)
- [Publishing Projects via OGC API (WMS/WMTS, WFS, OGC API - Features) ](./gis/ogc-api/)
- [Custom Projections](./gis/proj/)
- [Supported Formats](./gis/supported_formats/)

Expand Down
4 changes: 3 additions & 1 deletion src/manage/dashboard/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ Here, the [**project permissions**](../permissions/#workspace-member-roles-and-p

### Settings and API {#settings}
In **Settings & API**, you can:
- **Enable** [OGC API access](../../gis/ogc-api/) and copy WFS and WMS / WMTS URL
- **Enable** [OGC API access](../../gis/ogc-api/) and copy WFS, WMS / WMTS and OGC API - Features URL
- [Regenerate URLS](../../gis/ogc-api/#regenerating-ogc-api-urls) for OGC API access
- make the project [public or private](../project-advanced/#make-your-project-public-private)
- [Transfer project](../project-advanced/#transfer-a-project) to another workspace
- [Regenerate map URL](../webmaps-sharing/#regenerate-webmap-url) to create a new URL for your [shared webmap](../webmaps-sharing/)
- [Delete project](../project-advanced/#delete-a-project)

![Project settings in Mergin Maps Dashboard](./mergin-maps-dashboard-project-settings.jpg "Project settings in Mergin Maps Dashboard")
Expand Down
Binary file modified src/manage/dashboard/mergin-maps-dashboard-project-settings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
13 changes: 13 additions & 0 deletions src/manage/webmaps-sharing/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
description: Mergin Maps webmaps can be shared using a URL link. You can also embed them directly on your website with a simple HTML code for seamless integration.

outline: deep
---

# Sharing and Embedding Webmaps <Badge text="Early access" type="warning"/>
Expand All @@ -23,6 +25,17 @@ To see this feature in action, you can try a link to our [sample webmap](https:/

To disable the map sharing, click the **Stop sharing** button.

### Regenerate webmap URL
If needed, you can invalidate existing access and create a new URL for your webmap.

1. Open your project on the <DashboardShortLink />

2. Navigate to the **Settings & API** tab and click the **Regenerate map URL** button.

![Mergin Maps regenerate webmap URL](./dashboard-project-settings-regenerate-map-url.webp "Mergin Maps regenerate webmap URL")

The current URL will stop working immediately. Your webmap will be accessible only through the new URL.

## Embedding webmaps using HTML

Webmaps that are shared can also be embedded on a website using the HTML `iframe` element with the [URL link](#sharing-maps-via-url) of the webmap.
Expand Down
Loading