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

Improve maps by intergrating MapLibre Native #28416

Open
louwers opened this issue Sep 17, 2024 · 9 comments
Open

Improve maps by intergrating MapLibre Native #28416

louwers opened this issue Sep 17, 2024 · 9 comments

Comments

@louwers
Copy link

louwers commented Sep 17, 2024

Is your feature request related to a problem?

Not sure if it is the same on all platforms, but I have noticed that the static maps looks quite bad and not nearly as polished as the rest of the application.

image

Also when you want to interact with them, it seems to be delegated to another system app (Apple Maps in the case of macOS).

Describe the solution you'd like

Intergrating with MapLibre Native would allow high-resolution maps with interactivity. It is possible to run on the server for static map generation, but it also has Qt bindings for client-side usage.

MapLibre Native is data-source agnostic. There are many commercial tile providers available, but if you just need a simple map projects like Protomaps make hosting your own tiles almost trivial.

It's all permissively licensed and actively developed. MapLibre is an open-source community and organization with many big players behind it. Disclaimer: I am maintainer for MapLibre Native.

Describe alternatives you've considered

Keep the current map.

Investigate other libraries for interactive maps.

Additional context

No response

@Aokromes
Copy link
Collaborator

platform wide bugs / requests belongs to https://bugs.telegram.org/

@louwers
Copy link
Author

louwers commented Sep 17, 2024

This is platform-specific though.

@Aokromes
Copy link
Collaborator

it will need to be same maps platform on every app.

@louwers
Copy link
Author

louwers commented Sep 17, 2024

@Aokromes Right now it isn't. The macOS app uses Apple Maps, the Android app uses Google Maps, this Qt app uses some kind of server-side static rendering.

@john-preston john-preston reopened this Sep 17, 2024
@john-preston
Copy link
Member

@louwers I don't quite understand who is going to pay for the servers that provide the tiles to the client. I see https://demotiles.maplibre.org/ in the examples in the repository that you link, but this doesn't look like something you should include in your project. Qt bindings won't work in TDesktop because it can't use QGLWidget in the main app window.

Map thumbnails use server side image generation from openstreetmaps data hosted on the server with some styles and some renderer, I don't know the details, but they're supposed to be fine, I guess.

There is interactive map support in a webview using Mapbox for location sending. It's nice, but it isn't free. I see this project has an alternative to the Mapbox GL library, but there still needs to be a server that feeds tile data to the client and usually it isn't free for huge amounts that may arise in TDesktop.

@louwers
Copy link
Author

louwers commented Sep 17, 2024

@john-preston You would be surprised how cheap hosting tiles can be. https://docs.protomaps.com/deploy/cost

@john-preston
Copy link
Member

john-preston commented Sep 17, 2024

@louwers I believe it's true, but I'm not ready to do that myself, I have too many other things to do..

@louwers
Copy link
Author

louwers commented Sep 17, 2024

@john-preston Understood. I think the tile hosting should be simple, the integration is probably the most time-consuming part.

Why can't the desktop app use QGLWidget/QOpenGLWidget? Is it because of macOS? MapLibre Native now also supports Metal, but it still has to be integrated with the Qt platform. And yes, MapLibre started out as a fork from Mapbox' client libraries when they stopped being open-source.

@john-preston
Copy link
Member

@louwers On the contrary, macOS is the only system where OpenGL is used unconditionally in the main window of the application :) But on Windows and Linux OpenGL is not reliable enough to use it in the main window (once you create an OpenGL widget, all window pipeline switches to OpenGL path and if you have any problems with drivers / anything, it'll just break the whole app).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants