Skip to content

Commit f51c1a7

Browse files
committed
webmaps update
1 parent b030401 commit f51c1a7

9 files changed

Lines changed: 93 additions & 23 deletions

File tree

src/.vitepress/sidebar/en.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,18 @@ export default {
3131
{ text: 'Member Roles and Permissions', link: '/manage/permissions/' },
3232
{ text: 'Synchronisation', link: '/manage/synchronisation/' },
3333
{ text: 'Mergin Maps Project', link: '/manage/project/' },
34+
{ text: 'Webmaps', link: '/manage/dashboard-maps/',
35+
items: [
36+
{ text: 'Sharing and Embedding', link: '/manage/webmaps-sharing/' },
37+
{ text: 'Troubleshooting', link: '/manage/webmaps-troubleshooting/' }
38+
] },
3439
{ text: 'How to Create a New Project', link: '/manage/create-project/' },
3540
{ text: 'How to Share, Transfer or Delete Projects', link: '/manage/project-advanced/' },
3641
{ text: 'How to Delete Files', link: '/manage/delete-files/' },
3742
{ text: 'How to Deploy Revised Projects', link: '/manage/deploy-new-project/' },
3843
{ text: 'How to Recover Missing Data', link: '/manage/missing-data/' },
3944
{ text: 'Mergin Maps QGIS Plugin Overview', link: '/manage/plugin/' },
4045
{ text: 'Mergin Maps Dashboard', link: '/manage/dashboard/' },
41-
{ text: 'Webmaps', link: '/manage/dashboard-maps/' },
4246
{ text: 'Project History and Versions', link: '/manage/project-history/' },
4347
{ text: 'Selective Synchronisation', link: '/manage/selective_sync/' }
4448
] },

src/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ The ecosystem consist of various components:
4545
- [Member Roles and Permissions](./manage/permissions/)
4646
- [Synchronisation](./manage/synchronisation/)
4747
- [Mergin Maps Project](./manage/project/)
48+
- [Webmaps](./manage/dashboard-maps/)
49+
- [Sharing and Embedding](./manage/webmaps-sharing/)
50+
- [Troubleshooting](./manage/webmaps-troubleshooting/)
4851
- [How to Create a New Project](./manage/create-project/)
4952
- [How to Share, Transfer or Delete Projects](./manage/project-advanced/)
5053
- [How to Delete Files](./manage/delete-files)
5154
- [How to Deploy Revised Projects](./manage/deploy-new-project/)
5255
- [How to Recover Missing Data](./manage/missing-data/)
5356
- [<QGISPluginName /> Overview](./manage/plugin/)
5457
- [Mergin Maps Dashboard](./manage/dashboard/)
55-
- [Webmaps](./manage/dashboard-maps/)
5658
- [Project History and Versions](./manage/project-history/)
5759
- [Selective Synchronisation](./manage/selective_sync/)
5860

src/manage/dashboard-maps/index.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
description: Webmaps display the map overview of your project's spatial data directly in your web browser, on Mergin Maps dashboard.
3+
outline: deep
34
---
45

56
# Webmaps
@@ -17,6 +18,7 @@ Webmaps are **not** available for <CommunityPlatformNameLink />.
1718

1819
## Webmaps content
1920

21+
### Project layers
2022
On the webmaps, you will see your survey layers or raster layers that are [packaged](../project/#packaging-qgis-project) with the project. Other layers, such as online [background maps](../../gis/settingup_background_map/#background-maps) or PostgreSQL layers are not displayed. The extent of maps is defined by the [extent set in the QGIS project](../../gis/features/#project-extent).
2123

2224
All maps on the <DashboardShortLink /> use [<MainPlatformName /> vector tile service](../../gis/settingup_background_map/#online-services-1) as a background map.
@@ -29,26 +31,38 @@ Click on a feature on the map to display its properties.
2931

3032
![Mergin Maps dashboard maps](./dashboard-map-properties.webp "Mergin Maps dashboard maps")
3133

32-
## Sharing maps via URL <Badge text="early access" type="warning"/>
33-
::: tip Early access feature
34-
Map sharing is in early access. If you would like to try it out, fill in [this form](https://wishlist.merginmaps.com/f/share-maps-via-url) to gain access to this feature.
34+
### Adding background maps
35+
By default, the online background maps from your project are not displayed on the webmaps. However, they can be added to your webmaps using a JavaScript file with the map definition to your project through <DashboardLink />.
3536

36-
Try out this <AppDomainNameLink id="maps/grDTleg8yCdSracIxs-hmFIGdDs" desc="example link"/> to see how shared maps work.
37+
:::warning Background maps licensing
38+
Keep in mind that background maps services and data sources come with their own terms of use, especially if they are to be publicly shared. You should comply with any terms and conditions of the services of your choice.
3739
:::
3840

39-
Webmaps can be shared via URL. [Admins or owners](../permissions/) can enable map sharing for a project, so that anyone with the link can display and explore your project in a web browser, without the need to log into <MainPlatformNameLink /> or making the project [public](../project-advanced/#make-your-project-public-private).
41+
1. Create a file named `map-script.js` with the following structure:
42+
43+
```import TileLayer from 'https://esm.sh/ol@10.8.0/layer/Tile'
44+
import { fromLonLat } from 'https://esm.sh/ol@10.8.0/proj'
45+
import XYZ from 'https://esm.sh/ol@10.8.0/source/XYZ'
4046
41-
1. Navigate to your project on the <DashboardShortLink />.
42-
2. In the **Map** tab, click on the **Share map** button to generate a shareable link
43-
3. Send the link to anyone to share your project
47+
const layer = new TileLayer({
48+
name: 'Map Name',
49+
source: new XYZ({
50+
url: 'https://server.my-maps.com/tile/{z}/{y}/{x}',
51+
attributions:
52+
'Tiles © copyright'
53+
})
54+
})
4455
45-
To disable the map sharing, click on the **Revoke sharing** button.
56+
MerginMaps.getMap().addLayer(layer)
57+
```
58+
This is a JavaScript file that defines background maps or other customisations that should be added to your webmap.
4659

47-
![Sharing maps via URL](./map-sharing-url.webp "Sharing maps via URL")
60+
2. Add the `map-script.js` to your project through <AppDomainNameLink />
4861

49-
::: tip Blog about shared maps
50-
You can read about this functionality in our blog post <MainDomainNameLink id="blog/a-final-surprise-for-the-year---shared-maps-via-url" desc="A final surprise for the year - shared maps via URL"/>.
51-
:::
62+
After syncing the project, the background map will be added to your webmap.
63+
64+
### Customisations
65+
Other customisations can be done. The `map-script.js` file
5266

5367
## Webmaps extent
5468

@@ -64,13 +78,9 @@ If this parameter is not defined, the map extent will be set as the *Advertised
6478

6579
If there are no extent settings in the QGIS project, <MainPlatformName /> will calculate the extent from layers in the project.
6680

67-
## Troubleshooting
68-
69-
### Map config does not exist
70-
The **Map** tab of a project on the <DashboardShortLink /> may display this error message:
71-
`Map config does not exist, please try update the project`
72-
73-
![Mergin Maps webmap Map config does not exist](./webmap-map-config-issue.webp "Mergin Maps webmap Map config does not exist")
81+
## Sharing maps via URL <Badge text="early access" type="warning"/>
7482

75-
This usually happens when the map was not initiated. All you need to do is to create a new version of the project: synchronisation of the project will activate the map content.
83+
Webmaps can be shared via URL or embedded on a website. You can find more details about this early access feature in [Sharing and Embedding Webmaps](../webmaps-sharing/).
7684

85+
## Troubleshooting
86+
Troubleshooting tips for webmaps can be found [here](../webmaps-troubleshooting/).
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
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.
3+
---
4+
5+
# Sharing and Embedding Webmaps <Badge text="early access" type="warning"/>
6+
[[toc]]
7+
8+
::: warning Early access feature
9+
Map sharing is in early access. If you would like to try it out, fill in [this form](https://wishlist.merginmaps.com/f/share-maps-via-url) to gain access to this feature.
10+
:::
11+
12+
The spatial data of your project can be displayed and explored in the **Map** tab of the project on the <DashboardShortLink />. As an early access feature, they can also be [shared via URL](#sharing-maps-via-url).
13+
14+
15+
:::tip Usage details
16+
Webmaps are available for <MainPlatformNameLink /> cloud and <EnterprisePlatformNameLink /> users.
17+
18+
Webmaps are **not** available for <CommunityPlatformNameLink />.
19+
:::
20+
21+
22+
## Sharing maps via URL
23+
24+
Webmaps can be shared via URL. [Admins or owners](../permissions/) can enable map sharing for a project, so that anyone with the link can display and explore your project in a web browser, without the need to log into <MainPlatformNameLink /> or making the project [public](../project-advanced/#make-your-project-public-private).
25+
26+
1. Navigate to your project on the <DashboardShortLink />.
27+
2. In the **Map** tab, click on the **Share map** button to generate a shareable link
28+
3. Send the link to anyone to share your project
29+
30+
To disable the map sharing, click on the **Revoke sharing** button.
31+
32+
![Sharing maps via URL](./map-sharing-url.webp "Sharing maps via URL")
33+
34+
::: tip Blog about shared maps
35+
You can read about this functionality in our blog post <MainDomainNameLink id="blog/a-final-surprise-for-the-year---shared-maps-via-url" desc="A final surprise for the year - shared maps via URL"/>.
36+
:::
37+
38+
## Embedding webmaps using iframe
39+
40+
174 KB
Loading
646 KB
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: Troubleshooting tips for Mergin Maps dashboard maps.
3+
---
4+
5+
# Troubleshooting webmaps
6+
7+
## Map config does not exist
8+
The **Map** tab of a project on the <DashboardShortLink /> may display this error message:
9+
`Map config does not exist, please try update the project`
10+
11+
![Mergin Maps webmap Map config does not exist](./webmap-map-config-issue.webp "Mergin Maps webmap Map config does not exist")
12+
13+
This usually happens when the map was not initiated. All you need to do is to create a new version of the project: synchronisation of the project will activate the map content.
14+
80.8 KB
Loading
275 KB
Binary file not shown.

0 commit comments

Comments
 (0)