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

Auto start editing of feature #331

Open
mapcentia opened this issue Aug 7, 2019 · 1 comment
Open

Auto start editing of feature #331

mapcentia opened this issue Aug 7, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mapcentia
Copy link
Collaborator

mapcentia commented Aug 7, 2019

We've a need for starting Vidi and when zoom to a feature and auto start editing of it.

Something like calling:
http://127.0.0.1:3000/app/mydb/feature/?startedit=feature.polygon|1#osm/10/9.3137/56.817/v:feature.polygon
Where startedit=feature.polygon|1 is layername|pkey (primary key field is stored in the pkey property of Meta)

If a feature exists, when start editing it:
image

If it doesn't when start creating it. (In this case no zooming will be done). The key from the URL will be used as input. In this case a the new feature with value 1 in primary key field will be used. Something like this (normally we don't send primary key on INSERTS but in this case we have to do that)

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "gid": 1,
        "id": 8
      },
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              9.753799,
              56.808773
            ],
            [
              9.899368,
              56.834325
            ],
            [
              9.908981,
              56.79599
            ],
            [
              9.913101,
              56.754605
            ],
            [
              9.805984,
              56.741804
            ],
            [
              9.727707,
              56.74557
            ],
            [
              9.753799,
              56.808773
            ]
          ]
        ]
      }
    }
  ]
}
@mapcentia mapcentia added the enhancement New feature or request label Aug 7, 2019
@sashuk
Copy link
Owner

sashuk commented Aug 14, 2019

Edge cases:

  • the feature.polygon|12 is provided, the identifier 12 already exists, but the layer is dynamically loaded - ensure that feature with such identifier does not exist in the layer;
  • the provided identifier already exists in the layer - start editing;
  • check the possibility of inserting data with specified identifiers (gid's);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants