mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-10-30 23:56:31 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			383 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			383 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const formatLocationsReq = (ctx, query) => {
 | |
| 	const {profile, opt} = ctx
 | |
| 
 | |
| 	return {
 | |
| 		cfg: {polyEnc: 'GPA'},
 | |
| 		meth: 'LocMatch',
 | |
| 		req: {input: {
 | |
| 			loc: {
 | |
| 				type: profile.formatLocationFilter(opt.stops, opt.addresses, opt.poi),
 | |
| 				name: opt.fuzzy ? query + '?' : query
 | |
| 			},
 | |
| 			maxLoc: opt.results,
 | |
| 			field: 'S' // todo: what is this?
 | |
| 		}}
 | |
| 	}
 | |
| }
 | |
| 
 | |
| export {
 | |
| 	formatLocationsReq,
 | |
| }
 |