Skip to content

Commit

Permalink
Restore map plugin documentation generation
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Apr 22, 2024
1 parent 0cc7f8f commit 7b496bd
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
47 changes: 47 additions & 0 deletions doc/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ Plugin reference
* [TimeManager](#timemanager)
* [TopBar](#topbar)
* [ZoomButton](#zoombutton)
* [EditingSupport](#editingsupport)
* [LocateSupport](#locatesupport)
* [MeasurementSupport](#measurementsupport)
* [OverviewMap](#overviewmap)
* [RedliningSupport](#redliningsupport)
* [ScaleBarSupport](#scalebarsupport)
* [SnappingSupport](#snappingsupport)

---
API<a name="api"></a>
Expand Down Expand Up @@ -832,3 +839,43 @@ Two specific plugins exist: ZoomInPlugin and ZoomOutPlugin, which are instances
| themeFlagBlacklist | `[string]` | Omit the button in themes matching one of these flags. | `undefined` |
| themeFlagWhitelist | `[string]` | Only show the button in themes matching one of these flags. | `undefined` |

EditingSupport<a name="editingsupport"></a>
----------------------------------------------------------------
Editing support for the map component.

LocateSupport<a name="locatesupport"></a>
----------------------------------------------------------------
GPS locate support for the map component.

MeasurementSupport<a name="measurementsupport"></a>
----------------------------------------------------------------
Measurement support for the map component.

| Property | Type | Description | Default value |
|----------|------|-------------|---------------|
| options | `{`<br />`  geodesic: bool,`<br />`}` | Options | `undefined` |

OverviewMap<a name="overviewmap"></a>
----------------------------------------------------------------
Overview map support for the map component.

| Property | Type | Description | Default value |
|----------|------|-------------|---------------|
| options | `object` | See [OpenLayers API doc](https://openlayers.org/en/latest/apidoc/module-ol_control_OverviewMap-OverviewMap.html) for general options.<br /> Aditionally, you can specify `layer: {type: "<wms|wmts>", ...}` to specify a custom overview layer. | `undefined` |

RedliningSupport<a name="redliningsupport"></a>
----------------------------------------------------------------
Redlining support for the map component.

ScaleBarSupport<a name="scalebarsupport"></a>
----------------------------------------------------------------
Scalebar support for the map component.

| Property | Type | Description | Default value |
|----------|------|-------------|---------------|
| options | `object` | See [OpenLayers API doc](https://openlayers.org/en/latest/apidoc/module-ol_control_ScaleLine-ScaleLine.html) | `undefined` |

SnappingSupport<a name="snappingsupport"></a>
----------------------------------------------------------------
Snapping support for the map component.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qwc2",
"version": "2024.04.18-master",
"version": "2024.04.22-master",
"description": "QGIS Web Client 2 core",
"author": "Sourcepole AG",
"license": "BSD-2-Clause",
Expand Down
7 changes: 7 additions & 0 deletions scripts/gen-plugin-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ fs.readdirSync(qwcPluginDir).forEach(entry => {
pluginData.push(reactDocs.parse(contents, reactDocs.resolver.findAllComponentDefinitions));
}
});
fs.readdirSync(qwcPluginDir + "/map").forEach(entry => {
if (entry.endsWith(".jsx")) {
const file = path.resolve(qwcPluginDir, "map", entry);
const contents = fs.readFileSync(file);
pluginData.push(reactDocs.parse(contents, reactDocs.resolver.findAllComponentDefinitions));
}
});
pluginData = pluginData.flat();

function parsePropType(type) {
Expand Down

0 comments on commit 7b496bd

Please sign in to comment.