gws.plugin.dimension¶
Dimension tool.
Client tool for drawing dimension lines on the map. While drawing, the pointer
snaps to the vertices of the features of the layers given by layerUids,
within pixelTolerance screen pixels. Dimensions are listed in a sidebar,
where they can be labeled and deleted, and are printed with the map. If a
storage is configured, they can be saved on the server and loaded again.
This module contains the dimension action. It passes the snapping settings
and the storage settings to the client and implements the API command
dimensionStorage, which reads and writes saved dimensions. The client part
(Sidebar.Dimension, Toolbar.Dimension) is in js.
Example:
actions+ {
type "dimension"
layerUids ["my_wfs_layer"]
pixelTolerance 10
storage {
permissions {
read "allow all"
write "allow all"
create "allow all"
}
}
}
client.addElements+ { tag "Sidebar.Dimension" }
client.addElements+ { tag "Toolbar.Dimension" }
Source code: gws.plugin.dimension
Package Contents¶
- class gws.plugin.dimension.Config¶
Bases:
gws.base.action.ConfigTool for drawing dimensions on the map.
- storage: gws.base.storage.Config | None¶
Storage for saved dimensions.
- class gws.plugin.dimension.Object¶
Bases:
gws.base.action.ObjectDimension action.
- storage: gws.base.storage.Object | None¶
Storage for saved dimensions, or
Noneif not configured.
- configure()¶
- handle_storage(req: gws.WebRequester, p: gws.base.storage.Request) gws.base.storage.Response¶
Read or write saved dimensions.
- props(user)¶