-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feat maplibre #221
Conversation
…ernals - change before release
… setOpacity in updateMlLayer
} as const; | ||
|
||
const getFeaturePropStyle = <T>(prop: keyof typeof defaultStyle) => { | ||
const style: DataDrivenPropertyValueSpecification<T> = ['coalesce', ['get', prop], defaultStyle[prop]]; |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?!
There was a problem hiding this 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!
* 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]>
* 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
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
CustomLayer
) is not workingWhat is the new behavior?
@boeckMt
Commits for this PR will start after: Merge branch 'main' into feat-maplibre
updateStyleLayerProperties
UKIS_METADATA.ignoreOpacity
andUKIS_METADATA.ignoreVisibility
StyleLayers
fromCustomLayer
orVectorLayer.options.style
StyleLayers
forGeoJson
Data (test forMultiPolygon
andMultiLineString
).GeoJson
Data), and use the paint property to get colors from features if they are available.Does this PR introduce a breaking change?
Other information
Is it part of one/more packages and which?
@dlr-eoc/map-maplibre
demo-maps