{"id":46549443,"url":"https://github.com/mapbender/mapbender-digitizer","last_synced_at":"2026-03-07T03:03:25.286Z","repository":{"id":34269560,"uuid":"38155940","full_name":"mapbender/mapbender-digitizer","owner":"mapbender","description":"Mapbender digitizing module","archived":false,"fork":false,"pushed_at":"2026-02-27T16:43:06.000Z","size":3613,"stargazers_count":5,"open_issues_count":9,"forks_count":9,"subscribers_count":16,"default_branch":"master","last_synced_at":"2026-02-27T17:43:44.055Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapbender.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-06-27T10:17:30.000Z","updated_at":"2026-02-19T11:15:39.000Z","dependencies_parsed_at":"2023-11-09T12:48:30.115Z","dependency_job_id":"2fe64de3-2739-4bdc-8ba6-1b4d699a084c","html_url":"https://github.com/mapbender/mapbender-digitizer","commit_stats":{"total_commits":1559,"total_committers":12,"mean_commits":"129.91666666666666","dds":0.6497754971135343,"last_synced_commit":"edf2210e65084b91ada02884f38b7ee2dc475acf"},"previous_names":[],"tags_count":165,"template":false,"template_full_name":null,"purl":"pkg:github/mapbender/mapbender-digitizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbender%2Fmapbender-digitizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbender%2Fmapbender-digitizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbender%2Fmapbender-digitizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbender%2Fmapbender-digitizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapbender","download_url":"https://codeload.github.com/mapbender/mapbender-digitizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbender%2Fmapbender-digitizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-07T03:03:15.282Z","updated_at":"2026-03-07T03:03:25.257Z","avatar_url":"https://github.com/mapbender.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mapbender Digitizer element\n\n:warning: This version is compatible with Mapbender 4 only. The latest digitizer release compatible\nwith Mapbender 3 is [1.5.7](https://github.com/mapbender/mapbender-digitizer/releases/tag/1.5.7)\n\n---\n\nDisplay and edit features (and feature attributes) stored in\ndatabase tables in a Mapbender application.\n\nFeature listings are displayed as (HTML) tables. Geometries\ncan be created or edited using a predefined set of tools, and\ntheir attributes can be in customizable forms.\n\nDesigned for use in a sidepane.\n\nData is organized into \"schemes\" to support integration of\nmultiple database tables.\n\nIf multiple schemes are defined, Digitizer will display a dropdown\nto allow schema switching.\n\nEach schema separately defines tool availability, how data is\nlisted, and the structure of the form used for editing attributes.\n\nConnects to PostgreSQL Postgis or Oracle spatial database tables. Please\nrefer to [the Data Source documentation](https://github.com/mapbender/data-source#configuring-repositories)\nfor details.\n\nConnection and table configuration may either be inlined into the schema configuration directly, or\nreference an existing global configuration placed into a Symfony container parameter.\n\nDigitizer does not support tables without geometry columns.\n\n## After installation\nUsing Digitizer requires registering *two* bundles in your application kernel. Register *both*\n`\\Mapbender\\DataManagerBundle\\MapbenderDataManagerBundle` and `\\Mapbender\\DigitizerBundle\\MapbenderDigitizerBundle`.\n\n## Configuring feature interactions\nEach schema may define the following values to control access to data modifying interactions:\n\n| name | type | description                                                                     | default |\n|---|---|---------------------------------------------------------------------------------|---|\n| allowCreate | boolean or list of strings | Allow user to make new features                                                 | true |\n| allowEdit | boolean or list of strings | Allow user to modify existing feature attributes                     | true |\n| allowDelete | boolean or list of strings | Allow user to remove features from the database                                 | true |\n| allowDigitize | boolean or list of strings | Allow geometry editing (attribute editing must also be allowed via `allowEdit`) | true |\n| roles | list of strings or null | Show this schema only to users with (at least one of) these roles               | null |\n\nThe `roles` list should contain entries understood by the Symfony grants system, such as\n`ROLE_USER` for logged-in users or `ROLE_GROUP_SOMETHING` for a user group created and\nassigned in the Mapbender administration backend.\n\nThe allow... settings named above may also contain lists of role names to limit\nmodification to certain groups of users. If they are booleans, access is uniform for\nall users (including anyonymous users).\n\n## User specific data\nData shown in each schema can be separate for different users. Each schema may define:\n| name | type | description | default |\n|---|---|---|---|\n| filterUser | boolean | Keep data separate for each user | false |\n| trackUser | boolean | Store the creating / modiying user (can be done without actually filtering selection) | false |\n\nSetting either of these to true additionally requires a `userColumn` (string) to\nbe defined in the dataStore / featureType definition. This must name a database\ncolumn of sufficient length to store user names.\n\nNote that with `filterUser` true, `trackUser` is implied and its setting, if present,\nis ignored.\n\nThe `userColumn` setting is a Digitizer / Data Manager extension and not documented (nor implemented) by\nthe data-source package.\n\n## Configuring feature display and interface behaviour\nEach schema may define the following values to control basic behaviour:\n\n| name | type | description | default |\n|---|---|---|---|\n| searchType | string or null | Initial state of checkbox for limiting feature loading to current visible map portion. On if exactly \"currentExtent\". Off for all other values | currentExtent |\n| allowRefresh | boolean | Offer button to reload data (for tables frequently modified by concurrent users) | false |\n| allowChangeVisibility | boolean | Offer buttons to toggle feature visibility | true |\n| displayPermanent | boolean | Keep features visible on map even after switching to a different schema | false |\n| displayOnInactive | boolean | Keep features visible on map even after deactivating Digitizer | false |\n| continueDrawingAfterSave | boolean | Keep drawing tool active after creating and saving a new feature (~fast batch mode feature creation) | false |\n| refreshLayersAfterFeatureSave | list of strings and / or numbers | Mapbender source instance ids (refer to \"Layersets\" tab in application backend) that will reload after any item is created, updated or deleted | -none- |\n\n## Configuring \"toolset\"\nEach schema may define a `toolset` setting to configure the types of drawing tools\navailable during geometry creation. This should be a list of strings, or null\nfor auto-configuration (which is the default).\n\nValid tool names are:\n* `drawPoint` for point creation\n* `drawLine` for line drawing\n* `drawPolygon` for polygon drawing\n* `drawRectangle`, `drawCircle`, `drawEllipse` for rectangles, circles and ellipses respectively\n* `drawDonut` for making interior cutouts in existing polygons\n\nIf `toolset` is set as an empty list, no geometry creation tools will be offered.\n\nIf `toolset` is null or not set, and the connected feature type declares its\n`geomType`, Digitizer will reduce the selection of tools to to those compatible with\nthe `geomType` (e.g. no line drawing for datasets containing only points or polygons).\n\nIf neither `toolset` nor the `geomType` are defined, all supported tools are offered.\n\nIf feature modification is allowed (via `allowDigitize` / `allowEdit`), vertex modification\nand feature translation tools will also be offered.\n\nIf `allowCreate` is set to false, no creation tools from the `toolset` setting will be\noffered. `drawDonut` (inherently a modification, not creation tool) may still be\noffered, if editing is allowed.\n\n## Configuring tabular item listing\nEach schema configuration contains an object under key `table` with the following structure:\n\n| name | type | description | default |\n|---|---|---|---|\n| columns | list of objects with `data` and `label` entries | maps database columns to HTMl table columns | Display primary key only |\n| searching | boolean | Enables display filtering by search term | true |\n| pageLength | integer | Limits the number of rows per page | 16 |\n\n## Combination schema\nIf a schema defines a `combine` setting (list of strings), it is treated as a combination schema.\nData from multiple other schemas is then displayed together. The entries in the `combine` list\nmust be the names of the sub-schemas to be combined.\n\nA schema with `combine` only allows a reduced set of other settings.\n\nIt may define `roles` to limit user access to the whole combination.\n\nIt may define `table` to explicitly specify table formatting of data\ncommon to all referenced sub-schemas.\n\nA schema referenced by a `combine` list *may* *not* itself define `combine`.\n\n## Configuring forms\nEach schema configuration contains a list of (potentially nested) objects under key\n`formItems`, defining the contents and structure of the form shown\nwhen an item is created or edited. Note that this form will also be\nused purely as a detail display vehicle even if editing is disabled.\n\nAdditionaly, the `popup` object in the schema controls properties of the\nthe popup itself. It supports the following values:\n\n| name | type | description | default |\n|---|---|---|---|\n| title | string | Popup title text | \"Edit\" (localized) |\n| width | string | valid CSS width rule | \"550px\" |\n\n\n### Form input fields\nForm input fields come in a multitude of different types, controlled by the `type`\nvalue. All inputs share a common set of configuration options:\n\n| name | type | description | default |\n|---|---|---|---|\n| type | string | Type of form input field (see below) | -none- |\n| name | string | Database column mapped to the input | -none- |\n| value | string | Initial field value on newly created items | -none- |\n| title | string | Label text for form input field | -none- |\n| attr | object | Mapping of HTML attributes to add to the input | -none- |\n| infoText | string | Explanatory text placed in a tooltip next to the label | -none- |\n| css | object | Mapping of CSS rules to add to the form group (container around label and input) | -none- |\n| cssClass | string | Added to the class attribute of the form group (container around label and input) | -none- |\n\nInput field `type` is one of\n* \"input\" for a [regular single-row text input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text)\n* \"textArea\" for a [multiple-row text input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea)\n* \"select\" for a [dropdown offering predefined choices](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select)\n* \"radioGroup\" for an expanded list of [predefined choices](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio)\n* \"checkbox\" for an [on / off choice](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox)\n* \"date\" for a [specialized input selecting a calendar day](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date) (produces standard SQL date string format \"YYYY-MM-DD\")\n* \"colorPicker\" for a [specialized input selecting a color](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color) (produces CSS-like hash + 6 hex digits string format)\n* \"file\" for [allowing file attachments](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file)\n\nMany common customizations for inputs can be performed purely with the `attr` object.\nE.g. type \"input\" can be restricted to allow numbers only by overriding\nits HTML type attribute; all inputs can be made required or readonly.\n\n```yml\n\u003c...\u003e\nformItems:\n  - type: input\n    name: strictly_formatted_column\n    title: Strict input pattern demo\n    attr:\n        pattern: '\\w{2}\\d{3,}'\n        placeholder: Two letters followed by at least three digits\n        required: true\n  - type: input\n    name: numeric_column\n    title: Numbers only\n    attr:\n      type: number\n      min: 10\n      max: 200\n      step: 10\n      required: true\n  - type: textArea\n    name: text_column\n    title: Very large text area\n    attr:\n      rows: 10\n```\n\n\n#### Choice input option formats\nTypes \"radioGroup\" and \"select\" require a list of objects under key\n`options` to specify the available choices. Option objects contain:\n\n| name | type | description | default |\n|---|---|---|---|\n| value | string | Generated database value for the choice | -none- |\n| label | string | Displayed text for the choice | Same as value |\n| attr | object | Mapping of HTML attributes to add to the individual HTML `\u003coption\u003e` or `\u003cinput type=\"radio\"\u003e` | -none- |\n\n```yml\n\u003c...\u003e\nformItems:\n  - type: select\n    options:\n      # Allow user to explicitly (re)select ~nothing in particular\n      - label: ''\n        value: ''\n      - label: First option text   # displayed\n        value: v1   # value in database column\n      - label: Second option text (disabled)\n        value: v2\n        attr:\n          disabled: true\n      - label: Third option text\n        value: v3\n```\n\nSelects (NOT radioGroup items) can alternatively specify `sql`\nand `connection` (Doctrine DBAL connection name) to generate choices\ndynamically. The `sql` _should_ generate `label` and `value` aliases\nfor clarity. If it does not, the first column of each\nrow is used as the option label and the last column as the submit value.\n\nStatic `option` definitions and `sql` can also be combined.\n```yml\n\u003c...\u003e\nformItems:\n  - type: select\n    options:\n      # Allow user to explicitly (re)select ~nothing in particular\n      - label: ''\n        value: ''\n      - label: Static option a\n        value: a\n    sql: SELECT CONCAT(\"label_prefix\", ': ', \"name\") AS label, \"id\" AS value FROM \"some_table\"\n    connection: name_of_some_connection\n```\n\nIf `sql` is defined but `connection` is omitted, the \"default\" DBAL connection\nis used for the query.\n\n#### File uploads\nFiles uploaded through `type: file` form items will be stored in the\nserver's file system. The mapped database column will only store a file path as a string.\n\nThe default storage path for uploads is determined by Mapbender, but\ncan be reconfigured on the \"dataStore\" / \"featureType\" level, individually\nfor each database column. This is done via a `files` object in the\n\"dataStore\" / \"featureType\" configuration.\n\nE.g.\n```yml\nschemes:\n  items_with_customized_upload_location:\n    dataStore:\n        connection: dm_connection_name\n        table: items_with_file_attachments\n        ## Customization per column here\n        files:\n          - field: attachment_path_column\n            path: /var/mapbender-attachments/dm/items_with_customized_upload_location/attachment_path_column\n```\n\nThe starting point for a relative `path` (no leading slash) is the web server document root.\n\nFor image attachments, you may link a `type: img` item that will automatically display a preview of the current attachment.\n\n```yml\n\u003c...\u003e\nformItems:\n    - type: file\n      title: Attached image\n      name: img_path_column\n      attr:\n        accept: 'image/*'\n    - type: image\n      name: img_path_column   # Link to input established by matching \"name\" value\n      src: attachment-placeholder.png\n```\n\n### Structural / misc form elements\n#### Type \"tabs\"\nComplex form dialogs can be organized into multiple tabs by inserting an object with `type: tabs`\ninto the `formItems` list, and assigning it one or more tab specifications, which\nconsist of `title` (text displayed on the tab) and `children` (contents of the tab).\n\n```yml\n\u003c...\u003e\npopup:\n  title: 'Multi-tab form dialog'\nformItems:\n  - type: tabs\n    children:\n      - title: 'First tab'\n        children:\n          # First tab form item specifications\n          - type: input\n            title: Input in first tab\n            \u003c...\u003e\n      - title: 'Second tab'\n        children:\n          # First tab form item specifications\n          - type: input\n            title: Input in second tab\n```\n\n### Misc container tags \"div\", \"span\", \"p\"\nInserts HTML `\u003cdiv\u003e`, `\u003cspan\u003e` or `\u003cp\u003e` tags. May specify `text` (encoded, inserted first) and `children` (list of more items to insert).\nSupports adding free-form HTML attributes via `attr` object and custom `cssClass`.\n\n```yml\n\u003c...\u003e\nformItems:\n  - type: p\n    text: This is an introductory paragraph.\n  # Arrange inputs in Bootstrap grid row + columns\n  - type: div\n    cssClass: row\n    children:\n      - type: input\n        title: Input in left column\n        cssClass: col-xs-4 col-4\n      - type: input\n        title: Input in middle column\n        cssClass: col-xs-4 col-4\n      - type: input\n        title: Input in right column\n        cssClass: col-xs-4 col-4\n```\n\n### Type \"html\"\nInserts custom HTML content (no escaping), wrapped into an extra div. May specify `attr` and `cssClass` to be added onto the containing div.\n```yml\n\u003c...\u003e\nformItems:\n  - type: html\n    html: 'This will \u003cstrong\u003enot\u003c/strong\u003e go through any HTML escaping.'\n    cssClass: added-on-wrapping-div\n```\n\n#### Type \"breakLine\"\nInserts a single HTML `\u003chr\u003e` element. Supports adding free-form HTML attributes via `attr` object and custom `cssClass`.\n\n\n## Configuring access\nEach schema may also limit the possible interactions users can perform:\n\n| name | type | description | default |\n|---|---|---|---|\n| allowCreate | boolean | Enables creation of new items | true |\n| allowEdit | boolean | Enables editing of existing items | true |\n| allowDelete | boolean | Enables deletion of existing items | true |\n| allowRefresh | boolean | Add button to explicitly reload items from database | false |\n\n## Example configuration\n```yaml\n\nschemes:\n  a_demo_schema:\n    label: Demo   # displayed in schema selector, if multiple schemes configured\n    dataStore:\n      connection: dm_connection_name\n      table: dm_items\n      uniqueId: id\n    allowEdit:    true    # Can edit existing items\n    allowCreate:  true    # Can create new items from scratch\n    allowDelete:  false   # Can not delete anything\n    allowRefresh: true    # Enable item refresh button\n    table:\n      columns:\n      - data: id\n        title: ID\n      - data: name\n        title: Item name\n    popup:\n      title: 'Edit dialog title'\n      width: 50vw   # half screen width\n    formItems:\n    - type: p\n      text: This is a non-interactive introductory paragraph.\n    - type: input\n      name: name\n      infoText: This will show up in a tooltip next to the label.\n      title: Item name\n      attr:\n        placeholder: 'Entry required'\n        required: true\n    - type: textArea\n      name: description\n      title: Longer description text\n      attr:\n        rows: 4\n    - type: radioGroup\n      title: Choose one\n      name: choice_column_1\n      options:\n        - label: Option 1\n          value: v1\n        - label: Option 2\n          value: v2\n      value: v2   # Pre-select second option by default for new items\n    - type: select\n      title: Select at least one (multiple choice)\n      attr:\n        required: required\n        multiple: multiple\n      name: choice_column_2\n      options:\n        - label: Option 1\n          value: v1\n        - label: Option 2 (disabled)\n          value: v2\n          attr:\n            disabled: disabled\n        - label: Option 3\n          value: v3\n      value: v1,v3   # use comma-separated values for default multi-select value\n```\n\n\n# Data Source\n\nComponents abstracting raw doctrine tables into repositories.\n\nThe base DataStore is a repository promoting loaded rows\ninto DataItem objects, and also supports DataItem objects when\nupdating / inserting.\n\nFeatureType is an extended repository type with spatial data support.\nIt loads / stores Feature objects, with dedicated methods\nfor accessing / replacing the geometry. The geometry is internally\nalways an EWKT, but methods are provided to get / update the plain WKT\nor the SRID individually.\n\nOnly a single geometry column per table is supported.\n\n## Main repository methods\nMethod `search` loads all rows from the table and promotes them into an array of DataItem / Feature objects.\nAccepts an array of controlling parameters. Allowed params are `maxResults`, `where` (string; additional\nSQL where clause). FeatureType additionally supports params `srid` (explicit geometry output SRID) and `intersect`\n(string; (E)WKT geometry to spatially limit results).\n\nMethod `count` Accepts the same parameters as search, but returns only the number of matched rows.\n\nMethod `getById` loads one DataItem / Feature. Filters are skipped.\n\nMethods `save`, `insert`, `update` perform storage. `save` auto-inflects to insert or update, depending on\nthe presence of an id in the passed argument. These methods accept either DataItem / Feature objects or arrays.\nThe affected or new row is reloaded and returned as a DataItem / Feature object.\n\nMethod `delete` removes the row corresponding with an id or a specific DataItem / Feature object.\n\n## Configuring repositories\n\nNamed DataStore / FeatureType repositorys can be pre-configured\nglobally via container parameters (`dataStores` and `featureTypes` respectively),\nor instantiated ad hoc from a configuration array.\n\nDataStore configuration supports the following values:\n\n| name | type | description | default |\n|---|---|---|---|\n| connection | string | name of doctrine connection | \"default\" |\n| table | string | name of table; required | -none- |\n| uniqueId | string | name of primary id column | \"id\" |\n| fields | list of strings | names of columns to load into DataItem / Feature objects | null (=auto-detect columns) |\n| filter | string | valid SQL where clause to build into all `search` invocations | null |\n| geomField (FeatureType only) | string | name of the geometry column | \"geom\" |\n| srid (FeatureType only) | integer or null | Source srid of `geomField`; used only if detection fails (certain views) | null |\n\nNOTE: you should _not_ attempt placing spatial data into the \"default\" database containing\nyour Doctrine entities. You _will_ encounter errors running Doctrine schema updates.\n\nNOTE: Both the `filter` setting and the `where` search param may use a magic placeholder `:userName`, which is\nautomatically bound to the name of the user running the query.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbender%2Fmapbender-digitizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapbender%2Fmapbender-digitizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbender%2Fmapbender-digitizer/lists"}