mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
486 B
TypeScript
16 lines
486 B
TypeScript
/// <reference path="./polyline.d.ts" />
|
|
|
|
// returns an array of lat, lon pairs
|
|
polyline.decode('_p~iF~ps|U_ulLnnqC_mqNvxq`@');
|
|
|
|
// returns a string-encoded polyline
|
|
polyline.encode([[38.5, -120.2], [40.7, -120.95], [43.252, -126.453]]);
|
|
|
|
// returns a string-encoded polyline from a GeoJSON LineString
|
|
polyline.fromGeoJSON({ "type": "Feature",
|
|
"geometry": {
|
|
"type": "LineString",
|
|
"coordinates": [[-120.2, 38.5], [-120.95, 40.7], [-126.453, 43.252]]
|
|
},
|
|
"properties": {}
|
|
}); |