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

Add image based rendering in InfoClickWin #224

Merged
merged 1 commit into from
Jun 21, 2021

Conversation

chrismayer
Copy link
Collaborator

This adds an (optional) additional image based rendering template in the InfoClickWin component. This allows to show an image and a description based on configurable attributes of the clicked feature.
The template is (more or less) the one of the deprecated FeatureInfoWin, which never made it as a module. Thus also removes FeatureInfoWin component.

The default behavior is as before, so as long as it is not configured actively in the app-conf the InfoClickWin shows the feature properties / attributes and the clicked coordinates in tables.

A valid "wgu-infoclick" module configuration to use the image based approach looks like:

    "wgu-infoclick": {
      "target": "menu",
      "win": "sidebar",
      "icon": "info",
      "darkLayout": true,
      "draggable": false,
      "showMedia": true,
      "mediaInfoLinkText": "More Info",
      "mediaInfoLinkUrlProp": "image",
      "imageProp": "image",
      "imageDescriptionProp": "imgTitle"
    },

image

whereas the default config would render the following (as before):

image

A more general approach how to make the rendering for the FeatureInfo more flexible should be evaluated separately and in a bigger manner.

This adds an (optional) additional image based rendering template in the
InfoClickWin component. This allows to show an image based and a
description based on configurable attributes of the clicked feature.
The template is (more or less) the one of the deprecated FeatureInfoWin,
which never made it as a module. Thus removes FeatureInfoWin component.
@JakobMiksch
Copy link
Collaborator

@chrismayer I have not tested it but the code looks fine.

@chrismayer
Copy link
Collaborator Author

Thanks for the review @JakobMiksch

@chrismayer chrismayer merged commit 7580a81 into wegue-oss:master Jun 21, 2021
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.

None yet

2 participants