@@ -752,6 +752,11 @@ describe("L.GeoJSON functions", function () {
752752 } ) ;
753753
754754 describe ( "#latLngToCoords" , function ( ) {
755+ it ( "accepts latlng array" , function ( ) {
756+ var coords = L . GeoJSON . latLngToCoords ( [ 2 , 1 , 3 ] ) ;
757+ expect ( coords ) . to . eql ( [ 1 , 2 , 3 ] ) ;
758+ } ) ;
759+
755760 it ( "returns an array of coordinates and altitude" , function ( ) {
756761 var coords = L . GeoJSON . latLngToCoords ( L . latLng ( 2 , 1 ) ) ;
757762 var coordsWithAlt = L . GeoJSON . latLngToCoords ( L . latLng ( 2 , 1 , 3 ) ) ;
@@ -772,6 +777,11 @@ describe("L.GeoJSON functions", function () {
772777 } ) ;
773778
774779 describe ( "#latLngsToCoords" , function ( ) {
780+ it ( "accepts multidimensional latlng array" , function ( ) {
781+ var coords = L . GeoJSON . latLngsToCoords ( [ [ 2 , 1 , 3 ] , [ 5 , 4 , 6 ] ] ) ;
782+ expect ( coords ) . to . eql ( [ [ 1 , 2 , 3 ] , [ 4 , 5 , 6 ] ] ) ;
783+ } ) ;
784+
775785 it ( "returns a multidimensional array of coordinates" , function ( ) {
776786 var coords = L . GeoJSON . latLngsToCoords ( [ L . latLng ( 2 , 1 ) , L . latLng ( 4 , 3 ) ] ) ;
777787 var coordWithAlt = L . GeoJSON . latLngsToCoords ( [ L . latLng ( 2 , 1 , 3 ) , L . latLng ( 5 , 4 , 6 ) ] ) ;
0 commit comments