set_third_dimension | R Documentation |
This function decodes the flexible polyline encoded line, changes the third dimension and encodes the line again.
set_third_dimension( encoded, third_dim_name, precision = 5L, third_dim_precision = 5L )
encoded |
character, encoded flexible polyline string. |
third_dim_name |
character, name of the third dimension to set (ABSENT, LEVEL, ALTITUDE, ELEVATION, CUSTOM1, CUSTOM2). |
precision |
integer, precision to use in encoding (between 0 and 15,
|
third_dim_precision |
integer, precision to use in encoding for the
third dimension (between 1 and 15, |
The line with the new third dimension as string in the flexible polyline encoding format.
The precision is not read from the header of the encoded line. Therefore it must be provided as a parameter for re-encoding.
# 2d line (nothing happens...) set_third_dimension("BFoz5xJ67i1B1B7PzIhaxL7Y", "ELEVATION") # 3d line set_third_dimension("BlBoz5xJ67i1BU1B7PUzIhaUxL7YU", "ELEVATION")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.