Skip to content

Commit 9b780e0

Browse files
authored
Simple static location sharing (#19754)
Adds static location share a la [MSC3488](matrix-org/matrix-spec-proposals#3488) behind a labs flag, supporting legacy `m.location` `msgtype` too. Powered by matrix-org/matrix-react-sdk#7135. Adds maplibre as a dependency. To make this work, you have to add a valid `map_style_url` to your config.json.
1 parent 95a2b8e commit 9b780e0

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

docs/config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ For a good example, see https://develop.element.io/config.json.
152152
1. `sentry`: [Sentry](https://sentry.io/) configuration for rageshake data being sent to sentry.
153153
1. `dsn`: the Sentry [DSN](https://docs.sentry.io/product/sentry-basics/dsn-explainer/)
154154
2. `environment`: (optional) The [Environment](https://docs.sentry.io/product/sentry-basics/environments/) to pass to sentry
155+
1. `map_style_url`: Maptile server URL for location sharing. e.g.
156+
'https://api.maptiler.com/maps/basic/style.json?key=YOUR_KEY_GOES_HERE'
155157
1. `analyticsOwner`: The entity that analytics data is being sent to. Used in copy
156158
when explaining to the user where data is being sent. If not set, defaults to `brand`.
157159

docs/labs.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,19 @@ entirely incomplete and may not work at all - it is not recommended for general
151151
Metaspaces are automatically populated spaces you can enable in your Space panel.
152152
By default, you'll have Home or All rooms, but you can opt in to a People, Favourites, and Other Rooms metaspace too.
153153

154+
## Location sharing (`feature_location_share`) [In Development]
155+
156+
Allows users to send and display location data using [maplibre](https://maplibre.org).
157+
158+
The current implementation is a quick in-progress development spike to
159+
demonstrate viability and prove [MSC3488](https://github.com/matrix-org/matrix-doc/pull/3488)
160+
and [MSC3489](https://github.com/matrix-org/matrix-doc/pull/3489) - **the UI has not yet
161+
been designed, and it will not exit labs until it has**.
162+
163+
For this to work, you must specify a valid maptiler.com API key in
164+
`"map_style_url": "https://api.maptiler.com/maps/basic/style.json?key=YOUR_KEY_GOES_HERE"`
165+
in your config.json, or find an alternative map tile server.
166+
154167
## Breadcrumbs v2 (`feature_breadcrumbs_v2`)
155168

156169
Instead of showing the horizontal list of breadcrumbs under the filter field, the new UX is an interactive context menu

src/vector/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
font-src 'self' data:;
3333
media-src * blob: data:;
3434
child-src * blob: data:;
35-
worker-src 'self';
35+
worker-src 'self' blob:;
3636
frame-src * blob: data:;
3737
form-action 'self';
3838
manifest-src 'self';

test/jest-mocks.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ Object.defineProperty(window, 'matchMedia', {
1212
dispatchEvent: jest.fn(),
1313
})),
1414
});
15+
16+
// maplibre requires a createObjectURL mock
17+
global.URL.createObjectURL = jest.fn();

0 commit comments

Comments
 (0)