Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2   9.3   9.4    Statistic  

Math.PolylineEncode

Encodes number in Polyline Algorithm Format.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Math 9.2 Yes Yes Yes Yes Yes
MBS( "Math.PolylineEncode"; Value )   More

Parameters

Parameter Description Example value
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

Blog Entries

Created 31st March 2019, last changed 31st March 2019


Math.PolylineDecode   -   Math.TextToNumber

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins