GeoNode/geonode-mapstore-client

Some issues with annotations

Closed this issue · 9 comments

Annotations have been roughly integrated with #334 but I noticed some problems:

  • id and visibility are shown instead of Title and Description
    image
  • GeoNode stores and shows "Annotations" as a map layer. I guess this is because MapStore creates the "Annotations" layer inside the map configuration, and GeoNode blindly processes it as a nomral layer. @allyoucanmap does this layers has some specific info that could drive its filtering inside the geonode adapter? I don't want to filter it on the base of a hardcoded "Annotations" title.image

GeoNode stores and shows "Annotations" as a map layer. I guess this is because MapStore creates the "Annotations" layer inside the map configuration, and GeoNode blindly processes it as a nomral layer. @allyoucanmap does this layers has some specific info that could drive its filtering inside the geonode adapter? I don't want to filter it on the base of a hardcoded "Annotations" title.

@giohappy I think we could try to filter out all the layer of type vector. The type vector is used for GeoJSON format inside mapstore

@giohappy I think we could try to filter out all the layer of type vector. The type vector is used for GeoJSON format inside mapstore

Ok... this should be done inside the django adapter I guess.

id and visibility are shown instead of Title and Description

@giohappy this issue seems related to a missing epic and reducers that are included only when the Annotation plugin is in the configuration. The epic setup the annotation layer adding a specific viewer to display the annotation results. I tried to add the Annotations plugin in the map preview but now I'm getting this results:

image

As you can see the button for editing are there even if we don't need those in a preview context and in this first investigation I did not find how to disable.

It seems that a map with annotations layers needs the Annotations plugin configured to make the identify work correctly.
A solution could be to add a config option for the Annotation plugin to disable the editing button in MapStore (if there are not yet)

A solution could be to add a config option for the Annotation plugin to disable the editing button in MapStore (if there are not yet)

Let's do it. Please open an issue for MapStore. Let's see if someone else can work on this.
@allyoucanmap please also open an issue for the other things, and give some indications on how / what to filter from the map config.

@allyoucanmap if I understand correctly (from the issue you opened on MapStore) the proposal is to exclude the Annotation plugin when in view mode.So your previous suggestion

A solution could be to add a config option for the Annotation plugin to disable the editing button in MapStore (if there are not yet)

is not necessary in this case, right?

@giohappy the issue is that it's missing the initialization process to add the correct viewer to annotation. Right now the correct viewer is applied only if the Annotation plugin is included in the localConfig. MapStore should apply the correct viewer even if the Annotation plugin is not included

as agreed @allyoucanmap we'll do the following:

  • exclude the Annotation Plugin from view mode and preview, so only the visualization of the annotation attributes will be visible (once geosolutions-it/MapStore2#7332 is done)
  • fix the loading of the Annotation plugin in 3.3.x. As we have seen it's not loaded even if in edit mode now.

@allyoucanmap can you let me know where we are with this?

@simboss I worked on MapStore and proposed this solution that was accepted but the work is still pending. geosolutions-it/MapStore2#7332 (comment)