Transforms the given ol.Coordinate to a string using the given string
template. The strings {x} and {y} in the template will be replaced with
the first and second coordinate values respectively.
Example without specifying the fractional digits:
var coord = [7.85, 47.983333];
var template = 'Coordinate is ({x}|{y}).';
var out = ol.coordinate.format(coord, template);
// out is now 'Coordinate is (8|48).'
Example explicitly specifying the fractional digits:
var coord = [7.85, 47.983333];
var template = 'Coordinate is ({x}|{y}).';
var out = ol.coordinate.format(coord, template, 2);
// out is now 'Coordinate is (7.85|47.98).'
Transforms the given ol.Coordinate to a string using the given string template. The strings
{x}and{y}in the template will be replaced with the first and second coordinate values respectively.Example without specifying the fractional digits:
Example explicitly specifying the fractional digits: