feat(gfi): migrate plugin - #447
Conversation
58e73f6 to
f941649
Compare
bb7336c to
6a3129e
Compare
|
The usually helpful variables (map, stores, etc.) are auto-exported as global variables for use with the browser's devtools in snowbox.
acbf752 to
425cfdb
Compare
# Conflicts: # examples/snowbox/services.js
There was a problem hiding this comment.
- Please add an example to
iceberg; this maybe should include an example with a layer where the feature list is not being used - There should be no horizontal scrollbar if no features are available

- Some things are missing / quite different with the featureList; some parts are connections with the markers feature. This includes:
- When hovering an element in the feature list, the feature is highlighted in the map with the hover style
- When hovering an element in the map, the feature is highlighted in the feature list (previously green); when hovering a clustered feature, all features that are part of the cluster are highlighted
- If I select a feature in the map, it is selected in the feature list
- If I select a feature in the feature list, the corresponding marker gets the selected style; currently, a yellow dot is being displayed
- If I select a feature in the feature list, the map should be centered on that feature
- If a feature is not selectable because of the configured
isSelectablefunction, it is not being shown in the feature list
The list may not be complete, so please take a look at Meldemichel regarding the various things mentioned above.
I'll be taking a look at the components and stores once you've tackled these things.
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
apply suggestion "use better word in comment" Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
apply suggestion "use better word in comment" Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
warm-coolguy
left a comment
There was a problem hiding this comment.
Incomplete review, but might as well.
| @@ -0,0 +1,50 @@ | |||
| <template> | |||
| <PolarCard | |||
| v-if="gfiStore.features.length > 0 || gfiStore.configuration.featureList" | |||
There was a problem hiding this comment.
This line will, when Gfi runs in the IconMenu, produce an error in situations where there's neither a featureList configured nor a feature chosen. It's also somewhat confusing that there's nothing to be seen.
Configuration:
[
{
plugin: pluginGfi({
directSelect: true,
coordinateSources: [
{
plugin: 'pins',
key: 'coordinate',
},
],
layers: {
[kielPolygon]: {
window: true,
geometry: true,
},
},
}),
},
],
pls fix
There was a problem hiding this comment.
I've double-checked and this happens as soon as featureList is deleted. I've checked in POLAR@2, and it's the identical (wrong) behaviour there, except that there's no error flying in the old country.
I propose these possible solutions:
- Just fix it. When there's a feature chosen, it appears normally, and when there's no feature chosen and we have the GFI window open, display an appropriate instructory text about clicking something or about "clicking something hasn't occurred yet".
- Don't fix it. Document that, whenever the plugin is rendered as part of the IconMenu,
featureListhas to be used, too. Also create an issue that describes this situation; I consider it a new-found bug in POLAR@2 (that maybe is migrated over to POLAR@3 in this step), or a missing feature, depending on what side of the coin we're looking at.
Maybe there's a third solution, or I am just missing a configuration parameter?
There was a problem hiding this comment.
As documenting this bug and fixing it seems to be a similar effort, therefore, here's a fix:
There was a problem hiding this comment.
Did you test this with the snowbox config or the one posted here?
If the former, I cannot reproduce it.
If the latter, this is the expected behaviour, isn't it?
There was a problem hiding this comment.
I don't remember. I think the issue was me not reading Does not work together with {@link MapConfiguration.markers}. on directSelect, which I falsely assumed.
I've now constructed another funny configuration that does this:
On removing clusterDistance: 40 from examples/snowbox/services.json's entry with id 6059, it works more as expected (and I don't think we'll have to further touch that behaviour at this point). But with the clusterDistance, the GFI (and GFI environment) is broken in these regards:
- Clustered feature still visible after zoom (it shouldn't be as the cluster is actually spread now)
- No feature is visibly selected (features are selected without clusterDistance)
- And we're showing the cluster feature instead of the clustered features
I'm not sure whether these are bugs, missing features, or just expected undefined behaviour. Depending on solution, we should maybe add/clarify that in the documentation, and maybe create issues, and maybe throw warnings in the code somewhere. I've checked @2 and it's not properly documented there.
| * | ||
| * @example `['status', 'type']` | ||
| * | ||
| * @defaultValue Display all properties |
There was a problem hiding this comment.
pls explain ??
The feature of the list of one features was not selected.
fix
The fix is one-line, all other changes are just re-ordering.
There was a problem hiding this comment.
This also happens in independent mode.
Source: Just saw it on my mobile device and got the white bar stuck across the screen.
warm-coolguy
left a comment
There was a problem hiding this comment.
@oeninghe-dataport Some more stuff.
| * ```ts | ||
| * { | ||
| * geometry: true, | ||
| * window: true, |
There was a problem hiding this comment.
In the current setup, I've set this to false for reports, and nothing changed. Both reports and kielPolygon continued to be in the feature list. This looks like a bug to me, I assume only the kielPolygon features should be left in.
There was a problem hiding this comment.
This also seems correct to me.
Fixed w/ 39ca3a1
There was a problem hiding this comment.
This fix breaks feature listeners. It's a common use case that, with window: false, subscribe(map, 'gfi', 'features', ... is used to fill e.g. a form on selecting a parcel or whatnot.
I've added a feature printer for our convenience. Window should be a purely in-POLAR-UI thing.
| @@ -0,0 +1,50 @@ | |||
| <template> | |||
There was a problem hiding this comment.
Not sure where to put this comment, but the whole thing just doesn't render with this configuration (I also removed the entry from IconMenu):
addPlugin(
map,
pluginGfi({
displayComponent: true,
layoutTag: 'MIDDLE_LEFT',
layers: {
[reports]: {
window: true,
geometry: false,
},
},
})
)
Maybe this falls together with #447 (comment), but I'm very unsure. Am I missing configuration?
There was a problem hiding this comment.
This fails as expected.
Nothing is rendered bc there is no source to select features from.
Probably, you'd expect that the markers have an effect; to achieve this, you need to configure featureList with bindWithCoreHoverSelect.
However, while testing this, I figured out that hasActiveWindowLayers was not reactive enough w.r.t. OL.
This is fixed w/ 568f49a, fe1a784
There was a problem hiding this comment.
There was a problem hiding this comment.
This is a bug I also recognized; it is fixed w/ 8d15b9f
Co-authored-by: Dennis Sen <108349707+warm-coolguy@users.noreply.github.com>
…/polar into vue3/migrate-plugin-gfi
warm-coolguy
left a comment
There was a problem hiding this comment.
🚚 @oeninghe-dataport here comes the fun truck, unloading a batch of riddles
| * | ||
| * @defaultValue Disabled by default | ||
| */ | ||
| multiSelect?: MultiSelect |
There was a problem hiding this comment.
Can't make this fly.
Trying to select babas:
Trying to select kikis:
If my configuration is erroneous, can you please provide the intended configuration?
Removing directSelect doesn't help. Using box yields the same behaviour.
Bonus: I held Shift instead of Strg and got this behaviour:
Do you know if there's an issue about this or where this comes from? Seems to be unrelated to GFI, but e.g. on https://static.hamburg.de/kartenclient/prod/ we have the same effect without the wobbliness. I guess we wobbled up somewhere.
| * The default style as seen in the example will be used for each part that is not customized. | ||
| * An empty object will return the complete default style while e.g. for an object without a configured fill the default fill will be applied. | ||
| */ | ||
| customHighlightStyle?: CustomHighlightStyle |
There was a problem hiding this comment.
There is none.
MasterportalAPI stealed our style.
cfb4a34
There was a problem hiding this comment.
But now there is one.
customHighlightStyle: {
fill: {
color: '#FF0000',
},
},| * @defaultValue `Infinity` | ||
| * @example `10` | ||
| */ | ||
| maxFeatures?: number |
There was a problem hiding this comment.







Summary
Migrate the GFI plugin.
Instructions for local reproduction and review
Additional hints
requestGfi*were migrated as-is and do not need to be reviewed therefore.Relevant tickets, issues, et cetera
Closes #368