@@ -203,9 +203,10 @@ num convertArea(num area,
203
203
}
204
204
205
205
206
- /// Converts coordinates from one system to another
207
- /// Valid systems: wgs84, mercator
208
- /// Returns: Array of coordinates in the target system
206
+ /// Converts coordinates from one system to another.
207
+ ///
208
+ /// Valid systems: [CoordinateSystem.wgs84] , [CoordinateSystem.mercator]
209
+ /// Returns: [List] of coordinates in the target system
209
210
List <double > convertCoordinates (
210
211
List <num > coord,
211
212
CoordinateSystem fromSystem,
@@ -224,9 +225,10 @@ List<double> convertCoordinates(
224
225
}
225
226
}
226
227
227
- /// Converts a WGS84 coordinate to Web Mercator
228
- /// Valid inputs: Array of [longitude, latitude]
229
- /// Returns: Array of [x, y] coordinates in meters
228
+ /// Converts a WGS84 coordinate to Web Mercator.
229
+ ///
230
+ /// Valid inputs: [List] of [longitude, latitude]
231
+ /// Returns: [List] of [x, y] coordinates in meters
230
232
List <double > toMercator (List <num > coord) {
231
233
if (coord.length < 2 ) {
232
234
throw Exception ("coordinates must contain at least 2 values" );
@@ -252,9 +254,10 @@ List<double> toMercator(List<num> coord) {
252
254
return [clampedX, clampedY];
253
255
}
254
256
255
- /// Converts a Web Mercator coordinate to WGS84
256
- /// Valid inputs: Array of [x, y] in meters
257
- /// Returns: Array of [longitude, latitude] coordinates
257
+ /// Converts a Web Mercator coordinate to WGS84.
258
+ ///
259
+ /// Valid inputs: [List] of [x, y] in meters
260
+ /// Returns: [List] of [longitude, latitude] coordinates
258
261
List <double > toWGS84 (List <num > coord) {
259
262
if (coord.length < 2 ) {
260
263
throw Exception ("coordinates must contain at least 2 values" );
0 commit comments