Encoder/decoder to encode or decode a polyline into a string.
See thePolylineEncoder for the one and only one instance of this class
Based on Mark McClure polyline encoder (more info needed...)
Decode a string into an array of coordinates (coordinates can be 1d, 2d, 3d or more...)
Name | Type | Description |
---|---|---|
encodedString | String | The string to decode |
precisions | Array of Number | An array with the precision to use for each dimension |
Encode an array of coordinates to a string ( coordinates can be 1d or 2d or 3d or more...)
Name | Type | Description |
---|---|---|
coordinatesArray | Array of Array of Number | The coordinates to encode |
precisions | Array of Number | An array with the precision to use for each dimension |
Tmp variable for decode and decodeDelta methods communication (cannot use parameter the two functions are modifying the value )
Simple constant to use for computations
Simple constant to use for computations
Simple constant to use for computations
Simple constant to use for computations
Simple constant to use for computations
Simple constant to use for computations
Helper method for the decode...
Name | Type | Description |
---|---|---|
encodedString | String | The string to decode |
Helper method for the encode...
Name | Type | Description |
---|---|---|
current | Array of Number | The current coordinates to encode |
previous | Array of Number | The previously encoded coordinates |
factorD | Number | The precision to use |