Add ol.coordinate.format function

Return a formatted coordinate. Example usage:
  > ol.coordinate.format([0.01 ,12.14], "{x}, {y}", 2)
  "0.01, 12.14"
  > ol.coordinate.format([0.01 ,12.14], "lat: {y} / lon: {x}", 1)
  "lat: 12.1 / lon: 0.0"
This commit is contained in:
Frederic Junod
2013-10-28 14:14:42 +01:00
parent 5928c1cea1
commit cdf34b558a
2 changed files with 21 additions and 7 deletions
+1
View File
@@ -1,4 +1,5 @@
@exportSymbol ol.coordinate.createStringXY
@exportSymbol ol.coordinate.format
@exportSymbol ol.coordinate.toStringHDMS
@exportSymbol ol.coordinate.toStringXY
@exportSymbol ol.coordinate.fromProjectedArray