decode

This block is part of the value group and was last modified in core v14.0.1.

decode v13.0.8 Updated v14.0.1

takes a string representation of 1+ coordinate pairs and returns an array of lat, lon arrays.

In pins 2
  • decoded required
    value

    the google-esque polyline decoded string

  • precision
    number
Out pins 1
  • locations
    array

Decodes a Google-encoded polyline into an array of [lat, lng] pairs - latitude FIRST - dividing by 10^precision (default 5). An empty string yields an empty array. Input is not validated: malformed strings produce nonsense coordinates rather than an error.

A typical wiring for decode: value feeds the value pin; the array out pin feeds length.

Studio canvas example for the decode block: typical wiring for decode.

Version history

Introduced in v13.0.8.

Last modified in v14.0.1.


Back to value Return to the main group to view all sub-groups Back to esque polyline Return to the group to view all blocks within this group