Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Math.PolylineEncode
Encodes number in Polyline Algorithm Format.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Math | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "Math.PolylineEncode"; Value ) More
Parameters
Parameter | Description | Example |
---|---|---|
Value | The value to encode. | 40,7 |
Result
Returns text or error.
Description
Encodes number in Polyline Algorithm Format.We take a number (latitude or longitude) and encode it as an ASCII text.
See
https://developers.google.com/maps/documentation/utilities/polylinealgorithm
Examples
Encode number:
MBS("Math.PolylineEncode"; 38.5)
Example result: _p~iF
Encode another value:
MBS("Math.PolylineEncode"; -120.2)
Example result: ~ps|U
Encode a polyline with 3 points:
// Points: (38.5, -120.2), (40.7, -120.95), (43.252, -126.453)
MBS("Math.PolylineEncode"; 38.5) & MBS("Math.PolylineEncode"; -120.20) &
MBS("Math.PolylineEncode"; 40.7 - 38.5) & MBS("Math.PolylineEncode"; -120.95 - -120.2) &
MBS("Math.PolylineEncode"; 43.252 - 40.7) & MBS("Math.PolylineEncode"; -126.453 - -120.95)
Example result: _p~iF~ps|U_ulLnnqC_mqNvxq`@
See also
Release notes
- Version 9.2
- Added Math.PolylineEncode and Math.PolylineDecode functions for Google's Encoded Polyline Algorithm Format.
Blog Entries
- Was gibt es neues bei MBS Version 9.2
- MBS FileMaker Plugin, version 9.2pr1
- Encoded Polyline Algorithm Format
This function is free to use.
Created 31st March 2019, last changed 30th January 2023