Updated submission
This commit is contained in:
parent
9a01b1b443
commit
5c2dd0395e
3 changed files with 8 additions and 8 deletions
|
@ -23,12 +23,12 @@ class HomePage extends ReactiveWidget<HomeModel> {
|
||||||
child: Card(
|
child: Card(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SwitchListTile(
|
// SwitchListTile(
|
||||||
value: model.markerState == MarkerState.override,
|
// value: model.markerState == MarkerState.override,
|
||||||
onChanged: model.overrideMarkers,
|
// onChanged: model.overrideMarkers,
|
||||||
title: const Text("Show stops list"),
|
// title: const Text("Show stops list"),
|
||||||
subtitle: const Text("To select a start or end stop, use the buttons below"),
|
// subtitle: const Text("To select a start or end stop, use the buttons below"),
|
||||||
),
|
// ),
|
||||||
LatLongEditor(
|
LatLongEditor(
|
||||||
latitudeController: model.startLatitudeController,
|
latitudeController: model.startLatitudeController,
|
||||||
longitudeController: model.startLongitudeController,
|
longitudeController: model.startLongitudeController,
|
||||||
|
|
|
@ -32,7 +32,7 @@ Iterable<StopState>? findPath(Coordinates start, Coordinates end) {
|
||||||
endPoint: end,
|
endPoint: end,
|
||||||
);
|
);
|
||||||
log("Finding a route using ${state.hash()}");
|
log("Finding a route using ${state.hash()}");
|
||||||
final result = aStar(state);
|
final result = aStar(state, limit: 2500);
|
||||||
if (result == null) continue;
|
if (result == null) continue;
|
||||||
paths.add(result.reconstructPath());
|
paths.add(result.reconstructPath());
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ class StopState extends AStarState<StopState> with Encodable {
|
||||||
static late final Map<StopID, Stop> stops;
|
static late final Map<StopID, Stop> stops;
|
||||||
|
|
||||||
static Iterable<Stop> findStopsNear(Coordinates location) {
|
static Iterable<Stop> findStopsNear(Coordinates location) {
|
||||||
const numStops = 5;
|
const numStops = 3;
|
||||||
log("Finding stops near $location...");
|
log("Finding stops near $location...");
|
||||||
final stopDistances = [
|
final stopDistances = [
|
||||||
for (final stop in stops.values)
|
for (final stop in stops.values)
|
||||||
|
|
Loading…
Reference in a new issue