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

Feat maplibre #221

Merged
merged 39 commits into from
Mar 18, 2024
Merged

Feat maplibre #221

merged 39 commits into from
Mar 18, 2024

Conversation

boeckMt
Copy link
Member

@boeckMt boeckMt commented Mar 15, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

  • updating layer styles (CustomLayer) is not working

What is the new behavior?

@boeckMt

Commits for this PR will start after: Merge branch 'main' into feat-maplibre

  • feat: Added new function updateStyleLayerProperties
  • feat: Added UKIS_METADATA.ignoreOpacity and UKIS_METADATA.ignoreVisibility
  • fix: Do not modify referenced objects when creating StyleLayers from CustomLayer or VectorLayer.options.style
  • fix: Create default StyleLayers for GeoJson Data (test for MultiPolygon and MultiLineString).
  • fix: Do not create a layer for each feature (GeoJson Data), and use the paint property to get colors from features if they are available.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Is it part of one/more packages and which?

  • @dlr-eoc/map-maplibre
  • demo-maps

lucas-angermann and others added 30 commits February 7, 2024 16:07
} as const;

const getFeaturePropStyle = <T>(prop: keyof typeof defaultStyle) => {
const style: DataDrivenPropertyValueSpecification<T> = ['coalesce', ['get', prop], defaultStyle[prop]];
Copy link
Member Author

Choose a reason for hiding this comment

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

@indus maybe you can check if this is the correct expression to get the property from the features, and if there is no such property, use a default from the defaultStyle?

Copy link

@indus indus Mar 15, 2024

Choose a reason for hiding this comment

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

Just by looking at it seems fine. I have no chance to test this. Did you face any problems with it?

Copy link

@indus indus Mar 15, 2024

Choose a reason for hiding this comment

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

maybe a function like this...

const coalesce= <T>(key: keyof typeof defaultStyle, default?: any) => {
        const style: DataDrivenPropertyValueSpecification<T> = ['coalesce', ['get', key], default || defaultStyle[key]];
//...
}

coalesce('fill');
coalesce('fill', '#f00');
coalesce('fill', defaultStyle.primaryColor);

...would be more versatile and descriptive?!

Copy link
Contributor

@lucas-angermann lucas-angermann left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you for the new features!

@boeckMt boeckMt merged commit 6255646 into main Mar 18, 2024
11 checks passed
@boeckMt boeckMt deleted the feat-maplibre branch March 18, 2024 08:28
boeckMt added a commit that referenced this pull request Mar 18, 2024
boeckMt added a commit that referenced this pull request Jul 5, 2024
* pre version after #221

* feat: prerelease

* fix: add layer with the correct beforeId on update PaintProperty

* BREAKING CHANGE: remove hasUkisLayerMetadata and move addUkisLayerMetadata and getUkisLayerMetadata

* fix: workaround that tried to get beforeId after layer was removed

* fix: set layout.visibility in style of VectorLayer

* BREAKING CHANGE: change imports from move functions - fe12285

* some fixes of 12.0.1-next.1

* version: create prerelease

* feat: add tilejson for open-map-style

* BREAKING CHANGE: move type IPopupEvent from @dlr-eoc/map-ol to @dlr-eoc/services-layers

* fix: set attribution of tms vector layer

* version: create prerelease

* version: create prerelease

* fix: set subdomains of tms vector layer

* BREAKING CHANGE: update maplibre-gl to v^4.1.3

* fix: maplibre-gl changed use of addSourceType

* fix: maplibre-gl changed exported types

* test: fix tiles url for planet_eoc

* docs: install workspaces and prereleases

* fix: temporary fix for re-exposing StyleLayer from maplibre

* docs: update prereleases

* version: create prerelease

* version: create prerelease

* docs: version for prerelease

* version: sync in lock file

* feat: new function setUkisLayerMetadata

* fix: return type of getUkisLayerMetadata

* test: get and set UkisLayerMetadata

* feat: update maplibre to 4.5.0 #225

* docs: adjusting testing order

* fix: small syntax improvement

---------

Co-authored-by: ange_lu <[email protected]>
boeckMt added a commit that referenced this pull request Jul 8, 2024
* pre version after #221

* feat: prerelease

* fix: add layer with the correct beforeId on update PaintProperty

* BREAKING CHANGE: remove hasUkisLayerMetadata and move addUkisLayerMetadata and getUkisLayerMetadata

* fix: workaround that tried to get beforeId after layer was removed

* fix: set layout.visibility in style of VectorLayer

* BREAKING CHANGE: change imports from move functions - fe12285

* some fixes of 12.0.1-next.1

* version: create prerelease

* feat: add tilejson for open-map-style

* BREAKING CHANGE: move type IPopupEvent from @dlr-eoc/map-ol to @dlr-eoc/services-layers

* fix: set attribution of tms vector layer

* version: create prerelease

* version: create prerelease

* fix: set subdomains of tms vector layer

* BREAKING CHANGE: update maplibre-gl to v^4.1.3

* fix: maplibre-gl changed use of addSourceType

* fix: maplibre-gl changed exported types

* test: fix tiles url for planet_eoc

* docs: install workspaces and prereleases

* fix: temporary fix for re-exposing StyleLayer from maplibre

* docs: update prereleases

* version: create prerelease

* version: create prerelease

* docs: version for prerelease

* version: sync in lock file

* feat: new function setUkisLayerMetadata

* fix: return type of getUkisLayerMetadata

* test: get and set UkisLayerMetadata

* feat: update maplibre to 4.5.0 #225

* fix: remove ol from map-maplibre deps where removed at 6255646

* BREAKING CHANGE: update ol from 7.3.0 to 9.2.4 #225

* fix: ol types after update use FeatureLike #225

* fix: demo-maps get wms caps not existing layer

* refactor: remove not used imports

* fix: do not add layers in AfterViewInit, can cause problems with ol map frame state

* fix: custom dtm layer after ol update #225

* refactor: add bbox to layers

* refactor: regenerate licenses

* docs: add Update ol to changelog #225
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.

3 participants