Skip to content

deltachat/maps

Repository files navigation

Maps Integration for Delta Chat clients

An "Integration" is a webxdc file that speaks to the deltachat-core-library instead of other webxdc instances. From the view of the messenger implementor, the integrations behave like a normal webxdc.

To use this integration in a client, get a core with 1.137.4 or newer, build maps.xdc as described below, add it to the client using dc_set_webxdc_integration()/dc_init_webxdc_integration() and open it as a usual webxdc.

The map is shown using Leaflet and looks like the following:

Maps Screenshot

The protocol used to speak to core is described atop of maps_integration.rs.

Compared to eg. Mapbox on Android, this solution is 8mb smaller and has 2000+ lines less boilerplate code.

In general, however, the integration could use other maps as well, it is not bound to Leaflet.

Online Demo

Building

to create maps.xdc file, execute:

./create-xdc.sh

Note, that maps.xdc is meant to be used as an integration as described below and will work only limited when send to a chat.

Replace Integrations

Webxdc developers can replace the shipped maps.xdc with a tweaked version - either use different map sources, different engines or add completely new features for tracking, hiking, whatever.

For that purpose:

  • In manifest.toml, add the entry request_integration = map (this is already true if you use this repository as a template)

  • Attach the .xdc to the "Saved Messages" chat of Delta Chat 1.50.0 or newer. If things work out, the summary will read "🌍 Used as map. Delete to use default"

When now tapping the map symbol inside any chat, the map replacement is started instead of the shipped one.

Note, that this has to be done locally. In a multi-device-setup, you have to perform this action for every device.

The replacing is experimental and not meant for end users yet but for Webxdc developers.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages