Math.PolylineDecode
-------------------

Decodes number from Polyline Algorithm Format.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Math](component_Math.md) | [9.2](newinversion92.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Math.PolylineDecode"; Text ) 

**MBS**( **"Math.PolylineDecode";** /\* Decodes number from Polyline Algorithm Format. \*/  
**$Text**) /\* The coordinate value to decode.e.g. "~ps|U" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Text | The coordinate value to decode. | "~ps\|U" |

### Result

Returns number or error.

### Description

Decodes number from Polyline Algorithm Format.  
We decode the number stored in the given text and return the numeric value.  
Precision is just 5 digits after comma.  
  
See  
<https://developers.google.com/maps/documentation/utilities/polylinealgorithm>  
### Examples

Decode a number:

 MBS ("Math.PolylineDecode"; "~ps|U")  
<small>  
Example result: -120.20</small>### See also

- [Math.PolylineEncode](MathPolylineEncode.md)

### Release notes

- **Version 9.2**
    - Added [Math.PolylineEncode](http://www.mbsplugins.eu/MathPolylineEncode.shtml) and [Math.PolylineDecode](http://www.mbsplugins.eu/MathPolylineDecode.shtml) functions for Google's Encoded Polyline Algorithm Format.

### Blog Entries

- [Was gibt es neues bei MBS Version 9.2](https://www.mbsplugins.de/archive/2019-07-16/Was_gibt_es_neues_bei_MBS_Vers/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.2pr1](https://www.mbsplugins.de/archive/2019-04-02/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [Encoded Polyline Algorithm Format](https://www.mbsplugins.de/archive/2019-03-31/Encoded_Polyline_Algorithm_For/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 31st March 2019 , last changed 30th January 2023

  
[Math.PixelToMillimeter](MathPixelToMillimeter.md) - [Math.PolylineEncode](MathPolylineEncode.md)

[HTML Version](MathPolylineDecode.shtml)