Aller au contenu principal

Markup editing bug when reopening markup saved in a project json file?

Répondu

Commentaires

2 commentaires

  • Cam Barnard

    Thanks for pointing the issue out. Wanted you to know it was captured a while back when you told us as issue # 197609.

    The root problem is that when we do our markup it isn't just one thing, but two things together in order to be WCAG AA 2.1 contrast compliant. When we serialize it out to a project we lose the associated between those two things.

    We have a couple of ideas on how to fix it that are in progress now.

    0
  • Peter Jackson

    A quick update on the above -

    As a workaround we have removed the WCAG contrast compliance and are using simple markup. However, there are still problems. When a user creates markup and then deletes one or more of their markup features. there are two significant problems. 

    1. Printing fails to start when clicking the Print button from the Print Template options. Nothing happens and there is no feedback/error displayed for the user. In Developer Tools there's this error: 

    Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'type')
        at e.fromEsriApiGraphicsLayer  

    2. After saving a json project file, when loading the saved project the map zooms to the correct location but fails to display any markup features at all. Again, there is no feedback/error displayed for the user. In Developer Tools there is this error:

    Uncaught (in promise) TypeError: Cannot read properties of null (reading 'spatialReference')

    In the project json the deleted feature is retained but lacks any "geometry" component:

     {
                "attributes": {
                    "graphic-visible": true
                },
                "symbol": {
                    "type": "esriSFS",
                    "color": [251, 43, 17, 33],
                    "outline": {
                        "type": "esriSLS",
                        "color": [251, 43, 17, 255],
                        "width": 2.5,
                        "style": "esriSLSSolid"
                    },
                    "style": "esriSFSSolid"
                }
            }

    This is causing a lot of issues for users and work for admin because the only way to recover the projects is to edit the json and remove the deleted features manually. 

    0

Vous devez vous connecter pour laisser un commentaire.