@@ -13,47 +13,47 @@ describe('L.mapbox.geocoder', function() {
1313 it ( 'supports multiple arguments' , function ( ) {
1414 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
1515 expect ( g . queryURL ( [ 'austin' , 'houston' ] ) )
16- . to . eql ( 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key' ) ;
16+ . to . eql ( 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key' ) ;
1717 } ) ;
1818
1919 it ( 'supports proximity' , function ( ) {
2020 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
2121 expect ( g . queryURL ( { query : [ 'austin' , 'houston' ] , proximity : [ 10 , 15 ] } ) )
22- . to . eql ( 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&proximity=15,10' ) ;
22+ . to . eql ( 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&proximity=15,10' ) ;
2323 } ) ;
2424
2525 it ( 'supports country option' , function ( ) {
2626 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
2727 expect ( g . queryURL ( { query : [ 'austin' , 'houston' ] , country : 'us' } ) )
28- . to . eql ( 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&country=us' ) ;
28+ . to . eql ( 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&country=us' ) ;
2929 } ) ;
3030
3131 it ( 'supports bbox option' , function ( ) {
3232 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
3333 expect ( g . queryURL ( { query : [ 'austin' , 'houston' ] , bbox : [ - 104.0458814 , 26.0696823 , - 93.7347459 , 36.4813628 ] } ) )
34- . to . eql ( 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&bbox=-104.0458814,26.0696823,-93.7347459,36.4813628' ) ;
34+ . to . eql ( 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&bbox=-104.0458814,26.0696823,-93.7347459,36.4813628' ) ;
3535 } ) ;
3636
3737 it ( 'supports autocomplete option' , function ( ) {
3838 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
3939 expect ( g . queryURL ( { query : [ 'austin' , 'houston' ] , country : 'us' , autocomplete : false } ) )
40- . to . eql ( 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&country=us&autocomplete=false' ) ;
40+ . to . eql ( 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&country=us&autocomplete=false' ) ;
4141 } ) ;
4242
4343 it ( 'rounds proximity params correctly' , function ( ) {
4444 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
4545 expect ( g . queryURL ( { query : [ 'austin' , 'houston' ] , proximity : L . latLng ( - 10.12345 , 15.67890 ) } ) )
46- . to . eql ( 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&proximity=15.679,-10.123' ) ;
46+ . to . eql ( 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&proximity=15.679,-10.123' ) ;
4747 } ) ;
4848
4949 it ( 'rounds reverse ' )
5050
5151 it ( 'supports types' , function ( ) {
5252 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
5353 expect ( g . queryURL ( { query : [ 'austin' , 'houston' ] , types : 'place' } ) )
54- . to . eql ( 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&types=place' ) ;
54+ . to . eql ( 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&types=place' ) ;
5555 expect ( g . queryURL ( { query : [ 'austin' , 'houston' ] , types : [ 'place' , 'address' ] } ) )
56- . to . eql ( 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&types=place,address' ) ;
56+ . to . eql ( 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key&types=place,address' ) ;
5757 } ) ;
5858 } ) ;
5959
@@ -62,7 +62,7 @@ describe('L.mapbox.geocoder', function() {
6262 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
6363
6464 server . respondWith ( 'GET' ,
65- 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key' ,
65+ 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin;houston.json?access_token=key' ,
6666 [ 200 , { 'Content-Type' : 'application/json' } , JSON . stringify ( helpers . geocoderBulk ) ] ) ;
6767
6868 g . query ( [ 'austin' , 'houston' ] , function ( err , res ) {
@@ -77,7 +77,7 @@ describe('L.mapbox.geocoder', function() {
7777 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
7878
7979 server . respondWith ( 'GET' ,
80- 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/austin.json?access_token=key' ,
80+ 'https://api .mapbox.com/geocoding/v5/mapbox.places/austin.json?access_token=key' ,
8181 [ 200 , { "Content-Type" : "application/json" } , JSON . stringify ( helpers . geocoderAustin ) ] ) ;
8282
8383 g . query ( 'austin' , function ( err , res ) {
@@ -93,7 +93,7 @@ describe('L.mapbox.geocoder', function() {
9393 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
9494
9595 server . respondWith ( 'GET' ,
96- 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/nonesuch.json?access_token=key' ,
96+ 'https://api .mapbox.com/geocoding/v5/mapbox.places/nonesuch.json?access_token=key' ,
9797 [ 200 , { 'Content-Type' : 'application/json' } , JSON . stringify ( { "type" :"FeatureCollection" , "query" :[ "nonesuch" ] , "features" :[ ] } ) ] ) ;
9898
9999 g . query ( 'nonesuch' , function ( err , res ) {
@@ -110,7 +110,7 @@ describe('L.mapbox.geocoder', function() {
110110 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
111111
112112 server . respondWith ( 'GET' ,
113- 'https://a.tiles .mapbox.com/geocoding/v5/mapbox.places/-97.7%2C30.3.json?access_token=key' ,
113+ 'https://api .mapbox.com/geocoding/v5/mapbox.places/-97.7%2C30.3.json?access_token=key' ,
114114 [ 200 , { "Content-Type" : "application/json" } , JSON . stringify ( helpers . geocoderReverse ) ] ) ;
115115
116116 g . reverseQuery ( { lat : 30.3 , lng : - 97.7 } , function ( err , res ) {
@@ -125,7 +125,7 @@ describe('L.mapbox.geocoder', function() {
125125 var g = L . mapbox . geocoder ( 'mapbox.places' ) ;
126126
127127 server . respondWith ( 'GET' ,
128- / h t t p s : \/ \/ a \. t i l e s \. m a p b o x \. c o m \/ g e o c o d i n g \/ v 5 \/ m a p b o x .p l a c e s \/ [ \- \d \. ] + ( % 2 C | , ) [ \- \d \. ] + \. j s o n \? a c c e s s _ t o k e n = k e y / ,
128+ / h t t p s : \/ \/ a p i \. m a p b o x \. c o m \/ g e o c o d i n g \/ v 5 \/ m a p b o x .p l a c e s \/ [ \- \d \. ] + ( % 2 C | , ) [ \- \d \. ] + \. j s o n \? a c c e s s _ t o k e n = k e y / ,
129129 [ 200 , { "Content-Type" : "application/json" } , JSON . stringify ( helpers . geocoderReverseRounded ) ] ) ;
130130
131131 g . reverseQuery ( { lat : 30.1234567890 , lng : - 97.0987654321 } , function ( err , res ) {
0 commit comments