Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Share object persists the state of the application when using the Share function.

...

Code Block
languagetext
titleShare link example
https://secure.clevermaps.io/#/yufqzxkbiecj7jot/map/catchment_area_view?shareId=m1nfjgsglwlcxvlf
exb9g8wi9606ziyk

It's a link to a specific view in a specific CleverMaps project, followed by the ?shareId={shareId} parameter, which contains the ID of the share - exb9g8wi9606ziyk.

Each shared link consists can consist of at least 5 share objects, which extend these object types:

...

Please note that there can be more than one indicator, and more than one indicator drill. Or there can be no indicator or no dashboard. This depends on the settings of your dashboard.

...

Code Block
titleExample of a share object on dashboardindicator
collapsetrue
TODO

Key description

content

...

Status
colourRed
titlerequired

...

{
    "id": "exb9g8wi9606ziyk",
    "name": "customers_indicator_exb9g8wi9606ziyk",
    "type": "share",
    "content": {
        "shareId": "exb9g8wi9606ziyk",
        "objectId": "kgub2fqji9khcu70",
        "objectName": "customers_indicator",
        "diff": [
            {
                "op": "copy",
                "from": "/content/visualizations/areas",
                "path": "/content/visualizations/grid"
            },
            {
                "op": "copy",
                "from": "/content/visualizations/areas",
                "path": "/content/visualizations/zones"
            },
            {
                "op": "copy",
                "from": "/content/visualizations/areas",
                "path": "/content/visualizations/line"
            },
            {
                "op": "add",
                "path": "/content/scaleOptions",
                "value": {
                    "defaultDistribution": {
                        "range": [
                            1,
                            369
                        ],
                        "breaks": [
                            13,
                            44,
                            84,
                            179
                        ],
                        "displayIntervals": [
                            2,
                            3,
                            4
                        ]
                    }
                }
            }
        ],
        "breakingChanges": [],
        "forcedRebaseCount": 0
    }
}

This share object is applied on indicator. You can see it contains some copy operations, which enable the indicator visualization for grid, zones and lines. But mainly, scaleOptions object is present - and it's defaultDistribution sets the content of distribution block.

Code Block
titleExample of a share object on indicator drill
collapsetrue
{
  "id": "exb9g8wi9606ziyk",
  "name": "turnover_indicator_drill_on_exb9g8wi9606ziyk",
  "type": "share",
  "content": {
    "shareId": "exb9g8wi9606ziyk",
    "objectId": "iir539klh29s9mvo",
    "objectName": "turnover_indicator_drill_on",
    "diff": [
      {
        "op": "add",
        "path": "/content/blocks/3/visualized",
        "value": false
      },
      {
        "op": "add",
        "path": "/content/blocks/3/displayValues",
        "value": [
          "Offline"
        ]
      },
      {
        "op": "add",
        "path": "/content/blocks/4/visualized",
        "value": false
      },
      {
        "op": "add",
        "path": "/content/blocks/5/visualized",
        "value": false
      },
      {
        "op": "add",
        "path": "/content/blocks/6/visualized",
        "value": false
      }
    ],
    "breakingChanges": [],
    "forcedRebaseCount": 0
  }
}

This share object is applied on indicator drill. You can see it contains explicit disabled visalization of drill blocks. But mainly, for block 3 (categories) there is an displayValues setting which means we selected "Offline" category from the block.


Code Block
titleExample of a share object on marker selector
collapsetrue
{
    "id": "exb9g8wi9606ziyk",
    "name": "shops_marker_selector_exb9g8wi9606ziyk",
    "type": "share",
    "content": {
        "shareId": "exb9g8wi9606ziyk",
        "objectId": "nl3porml3fmg4o0a",
        "objectName": "shops_marker_selector",
        "diff": [
            {
                "op": "add",
                "path": "/content/keepFiltered",
                "value": {
                    "granularity": false,
                    "markers": true
                }
            },
            {
                "op": "add",
                "path": "/content/showIndicatorValuesOnMap",
                "value": false
            },
            {
                "op": "add",
                "path": "/content/clusterMarkers",
                "value": false
            }
        ],
        "breakingChanges": [],
        "forcedRebaseCount": 0
    }
}

This share object is applied on marker selector. You can see it contains three marker selector settings -  keepFilteredshowIndicatorValuesOnMap and clusterMarkers set to false.


Key description

content

KeyTypeOptionalityDescriptionConstraints
shareIdstring

Status
colourRed
titlerequired

id of the share (present in share link)

(a-z0-9)
objectIdstring
Status
colourGreen
titleoptional

id of metadata object on which the share is applied

(a-z0-9)
objectNamestring
Status
colourRed
titlerequired
name of metadata object on which the share is applied(a-z0-9_-)

diff

array
Status
colourRed
titlerequired
list of changes applied on the metadata object
breakingChangesarray
Status
colourGreen
titleoptional
list of changes which used to be applied on the metadata object, but were removed because they were not appliable after update of the metadat objects
forcedRebaseCountinteger
Status
colourGreen
titleoptional
number of times the metadata object was rebasedx => 0

...

KeyTypeOptionalityDescriptionConstraints
opstring

Status
colourRed
titlerequired

type of the operation

["add", "remove", "replace", "copy", "move"]
pathstring
Status
colourRed
titlerequired
path in the json on which the operation is applied(*)
value

stringstring 

integer

number

array

object

boolean

Status
colourGreen
titleoptional

value applied to the path

value is polymorphic - it can be of any type available in the JSON standard


...