PilotGaea 2D O'view
    正在準備搜尋索引...

    函數 createStringXY

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

      參數

      • 可選opt_fractionDigits: number

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

      回傳 CoordinateFormatType

      Coordinate format.

      stable