File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -307,14 +307,14 @@ transform.lookup = function (projection) {
307307 code = parts [ 1 ] ;
308308
309309 return $ . ajax ( {
310- url : 'https://epsg.io/?q= ' + code + '&format=json '
310+ url : 'https://epsg.io/' + encodeURIComponent ( code ) + '.proj4 '
311311 } ) . done ( function ( data ) {
312312 var result = ( data . results || [ ] ) [ 0 ] ;
313- if ( ! result || ! result . proj4 ) {
313+ if ( ! result ) {
314314 return defer . reject ( data ) . promise ( ) ;
315315 }
316316
317- proj4 . defs ( projection , result . proj4 ) ;
317+ proj4 . defs ( projection , result ) ;
318318 return $ . when ( proj4 . defs [ projection ] ) ;
319319 } ) ;
320320} ;
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ describe('geo.transform', function () {
124124 geo . transform . lookup ( 'EPSG:5000' ) . then ( spy ) ;
125125
126126 request = server . requests [ 0 ] ;
127- expect ( request . url ) . toMatch ( / \? q = 5 0 0 0 / ) ;
127+ expect ( request . url ) . toMatch ( / 5 0 0 0 \. p r o j 4 / ) ;
128128 request . respond ( 200 , { 'Content-Type' : 'application/json' } , JSON . stringify ( {
129129 status : 'ok' ,
130130 number_result : 1 ,
You can’t perform that action at this time.
0 commit comments