Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple static location sharing #19754

Merged
merged 10 commits into from
Dec 6, 2021
1 change: 1 addition & 0 deletions config.sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"features": { },
"default_federate": true,
"default_theme": "light",
"map_style_url": "https://api.maptiler.com/maps/basic/style.json?key=YOUR_KEY_GOES_HERE",
ara4n marked this conversation as resolved.
Show resolved Hide resolved
"roomDirectory": {
"servers": [
"matrix.org"
Expand Down
13 changes: 13 additions & 0 deletions docs/labs.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,16 @@ entirely incomplete and may not work at all - it is not recommended for general

Metaspaces are automatically populated spaces you can enable in your Space panel.
By default, you'll have Home or All rooms, but you can opt in to a People, Favourites, and Other Rooms metaspace too.

## Location sharing (`feature_location_share`) [In Development]

Allows users to send and display location data using [maplibre](https://maplibre.org).

The current implementation is a quick in-progress development spike to
demonstrate viability and prove [MSC3488](https://github.com/matrix-org/matrix-doc/pull/3488)
and [MSC3489](https://github.com/matrix-org/matrix-doc/pull/3489) - **the UI has not yet
been designed, and it will not exit labs until it has**.

For this to work, you must specify a valid maptiler.com API key in
`"map_style_url": "https://api.maptiler.com/maps/basic/style.json?key=YOUR_KEY_GOES_HERE"`
in your config.json, or find an alternative map tile server.
2 changes: 1 addition & 1 deletion src/vector/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
font-src 'self' data:;
media-src * blob: data:;
child-src * blob: data:;
worker-src 'self';
worker-src 'self' blob:;
frame-src * blob: data:;
form-action 'self';
manifest-src 'self';
Expand Down
3 changes: 3 additions & 0 deletions test/jest-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ Object.defineProperty(window, 'matchMedia', {
dispatchEvent: jest.fn(),
})),
});

// maplibre requires a createObjectURL mock
global.URL.createObjectURL = jest.fn();