Returns a ol.CoordinateFormatType function that can be used to format a {ol.Coordinate} to a string.
Example without specifying the fractional digits:
var coord = [7.85, 47.983333];var stringifyFunc = ol.coordinate.createStringXY();var out = stringifyFunc(coord);// out is now '8, 48' Copy
var coord = [7.85, 47.983333];var stringifyFunc = ol.coordinate.createStringXY();var out = stringifyFunc(coord);// out is now '8, 48'
Example with explicitly specifying 2 fractional digits:
var coord = [7.85, 47.983333];var stringifyFunc = ol.coordinate.createStringXY(2);var out = stringifyFunc(coord);// out is now '7.85, 47.98' Copy
var coord = [7.85, 47.983333];var stringifyFunc = ol.coordinate.createStringXY(2);var out = stringifyFunc(coord);// out is now '7.85, 47.98'
Optional
The number of digits to include after the decimal point. Default is 0.
0
Coordinate format.
stable
Generated using TypeDoc
Returns a ol.CoordinateFormatType function that can be used to format a {ol.Coordinate} to a string.
Example without specifying the fractional digits:
Example with explicitly specifying 2 fractional digits: