• 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'

    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'

    Parameters

    • Optional opt_fractionDigits: number

      The number of digits to include after the decimal point. Default is 0.

    Returns CoordinateFormatType

    Coordinate format.

    Api

    stable

Generated using TypeDoc