feat: pan on solution when submitting
All checks were successful
deploy to cloudflare pages / deploy (push) Successful in 32s
All checks were successful
deploy to cloudflare pages / deploy (push) Successful in 32s
This commit is contained in:
parent
bd229982f6
commit
c06553fb74
1 changed files with 7 additions and 0 deletions
|
@ -69,7 +69,14 @@
|
|||
if (response.ok && map) {
|
||||
const res: CheckResponse = await response.json();
|
||||
|
||||
const line = L.polyline([checkData.latlng, res.solution], {
|
||||
color: "black",
|
||||
weight: 6,
|
||||
}).addTo(map);
|
||||
map.flyToBounds(line.getBounds());
|
||||
|
||||
L.marker(res.solution).bindPopup(data.gameData.stopName).addTo(map).openPopup();
|
||||
|
||||
results = res;
|
||||
} else {
|
||||
alert("you dirty little cheater");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue