gws.plugin.mapshare.action

The mapshare action.

Source code: gws.plugin.mapshare.action

Module Contents

class gws.plugin.mapshare.action.Config

Bases: gws.base.action.Config

Shareable links and QR codes for a map position.

class gws.plugin.mapshare.action.CreateLinkResponse(*args, **kwargs)

Bases: gws.Response

Share link and its QR code.

qrCode: str

QR code of the link, as a data URL.

url: str

Link URL.

class gws.plugin.mapshare.action.CreateRequest(*args, **kwargs)

Bases: gws.Request

Request to create a share link.

scale: int | None

Map scale.

shape: gws.ShapeProps

Shared shape.

title: str | None

Title of the link.

class gws.plugin.mapshare.action.DecodeLinkRequest(*args, **kwargs)

Bases: gws.Request

Request to decode a share link.

Value of the s parameter of the link.

class gws.plugin.mapshare.action.DecodeLinkResponse(*args, **kwargs)

Bases: gws.Response

Decoded share link.

scale: int

Map scale, 0 if not given.

shape: gws.ShapeProps

Shared shape, in the CRS of the project map.

title: str

Title, empty if not given.

gws.plugin.mapshare.action.MAX_TITLE_LENGTH = 200
class gws.plugin.mapshare.action.Object

Bases: gws.base.action.Object

Map share action.

Show Value
"""(?x)
        ^
        (?P<scale>\d+)
        (
            (
                x
                (?P<x>-?\d+(\.\d+)?)
                y
                (?P<y>-?\d+(\.\d+)?)
            )
            |
            (
                w
                (?P<wkb>[0-9a-f]+)
            )
        )
        (
            _
            (?P<title>.+)
        )?
        $
    """

Create a share link and its QR code for a map position.

Decode a share link.

props(user)
class gws.plugin.mapshare.action.Props

Bases: gws.base.action.Props

linkParamName: str = 's'