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

Rework style settings and make QMapLibre::Settings more future-proof #57

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

ntadej
Copy link
Collaborator

@ntadej ntadej commented Oct 30, 2023

Rework style settings and make QMapLibre::Settings more future-proof by using private class for data storage.

A lot of work has been put into more flexible settings for QML plugin. Now most of the QGeoMapType properties can be set by providing JSON array as a value for maplibre.map.styles. A C++ equivalent of QMapLibre::Style is available. If unknown top-level parameters are set a warning is printed.

Provider defaultStyles are now renamed as providerStyles and are also removed from the main QMapLibre::Map class. By default no style is available. One can now also set a list of styles in QMapLibre::Settings to be used by widgets. Furthermore default coordinate and zoom level can be set.

This is in principle breaking change but it's a good time to do it now.

Closes #38 (@emericg).

@ntadej ntadej requested a review from louwers October 30, 2023 16:48
@ntadej ntadej force-pushed the url branch 2 times, most recently from 4ce4ee4 to 1d42b39 Compare October 31, 2023 10:13
@ntadej ntadej requested a review from birkskyum November 4, 2023 15:14
@louwers
Copy link
Collaborator

louwers commented Nov 6, 2023

I'll have a look later today.

Copy link
Collaborator

@louwers louwers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not very familiar with Qt, but overall LGTM, but I suggest using smart pointers to avoid having to do manual memory management.

Copy link
Collaborator

@louwers louwers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of smart pointers is better done in a separate PR as per discussion #57 (comment)

@ntadej ntadej merged commit fc9dc14 into maplibre:main Nov 14, 2023
10 checks passed
@ntadej ntadej deleted the url branch November 14, 2023 19:18
@ntadej ntadej added this to the 3.0 milestone Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to change map style
2 participants