feat(map): support multi-location station filters
This commit is contained in:
@@ -121,6 +121,13 @@ filterState.query = '';
|
||||
filterState.province = '广东省'; filterState.city = '广州市'; filterState.district = '黄埔区';
|
||||
assert.deepEqual(filteredStations().map(station => station.id), ['GD-1']);
|
||||
filterState.province = ''; filterState.city = ''; filterState.district = '';
|
||||
filterState.stationLocations = [
|
||||
{ province: '广东省', city: '广州市', district: '' },
|
||||
{ province: '浙江省', city: '嘉兴市', district: '' }
|
||||
];
|
||||
assert.deepEqual(filteredStations().map(station => station.id).sort(), ['GD-1', 'ZJ-1']);
|
||||
assert.equal(stationLocationFilterLabel(filterState.stationLocations[0]), '广州');
|
||||
filterState.stationLocations = [];
|
||||
assert.ok(Math.abs(distanceKm([113, 23], [114, 23]) - 102.4) < 1);
|
||||
assert.equal(locationCoordinates({ coords: { longitude: NaN, latitude: 23 } }), null);
|
||||
map = {
|
||||
|
||||
Reference in New Issue
Block a user