-
Notifications
You must be signed in to change notification settings - Fork 41
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
Generalized feature hover #269
Generalized feature hover #269
Conversation
I'll provide this as a preview and will add/fix unit tests and provide documentation on this feature after we incorporated #262. Some implementation specific details for discussion:
|
It would be great to have a example config that demonstrates this feature |
I do not mind using |
Hi @JakobMiksch, thanks for looking into this!
Ok nice. Since we only have few
Unfortunately it's not as simple here, because the new feature isn't app-config only. This is more a like a reusable base class which has a connection into app-config but requires to do your own overload (in a similar fashion to module cards). However I totally agree with you, that we need a documentation / example concept for those. I will share some thoughts in the related #265. |
…t customized OL overlays. Loose coupling of HoverController and MapOverlay's by means of Wegue event bus messages.
…ures. This can be configured by the layers 'hoverOverlay' attribute.
…t's initially rendered. Added some comments.
…e for 'mapLayers'. Support all hover attributes on WMS layers.
…o deferred creation is necessary.
…ta stored in the global Vue prototype. Unit tests for HoverController are externalized.
…umentation section 'reusable components'.
…describe the new hover functionality for WMS layers.
35f1d69
to
b29cab1
Compare
This has now be finalized from my side. The branch has been rebased on the current master and I added unit tests and a documentation section. I would kindly ask you to give it a review again, especially have a look at the documentation and the previously mentioned associated issues: Are we good to close them in the process? |
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.
Code looks good so far.
I tried the feature with your manual. The static overlay worked. But I could not get the "hover" running. Here my try https://github.com/JakobMiksch/wegue/tree/hover-test Maybe you have an idea what I was missing
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.
I tested both the static and the hover overlay and they work well.
The docs could be corrected a bit (see inline). But otherwise ready to merge.
Thanks @fschmenger for this powerful feature.
Co-authored-by: Jakob Miksch <[email protected]>
@JakobMiksch Thanks for the review and the suggested changes! Close #157 and #200 if you think they are resolved. |
@fschmenger thanks for pointing to the issues to close! |
This pull request generalizes Wegue's feature-hover concept by providing a vuetify based map-overlay wrapper. The hover concept has been extended to work for WMS layers by issuing 'GetFeatureInfo' requests. Here's an example of a custom map hover template in conjunction with a WMS layer, which I use in my application.
The new features in detail:
Declare OpenLayers overlays by means of vuetify templates
A new base class
wgu-map-overlay
has been introduced to implement map overlays with vuetify on-board controls. Here's an example of a simple statically positioned overlay:Easily create customized hover tooltips for specific layers by declaring custom overlays
You can now create custom hover tooltips and associate them with specific layers. Here's an example:
Implement your custom hover overlay.
Associate it with your layer by means of the
hoverOverlay
attribute, which should point to theoverlayId
declared above.The
hoverOverlay
attribute is optional. If not declared the tooltip is rendered inside Wegues defaultHoverTooltip
by using thehoverAttribute
(same mechanism as ever).WMS layers that support GetFeatureInfo requests, can be configured as hoverable in the same way.
This has been implemented in
HoverController.js
. To not stress the client and server by an enormous amount of async requests, I implemented a point-rest like behavior. This means any request and tooltip is currently deferred by 150ms after the last mouse move happened.