mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Fly a looked-up place by its coordinates alone, and adopt the bar's files
A place row sent its name with its coordinates, and a name that matches a city preset wins over them: "Paris, Texas" flew to Paris, France. Only the coordinates go now. The bar's styles and dock tests join the format scope and the bar its package. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
a3f4af91f8
commit
24731951a0
3 files changed
+32
-7
No files matched your search
@@ -1588,5 +1588,8 @@
|
||||
"scripts/wikidataPlaceTiles.mjs",
|
||||
"src/tooling/wikidataPlaceTiles.test.mjs",
|
||||
"src/ui/omnibarIntent.test.mjs",
|
||||
"src/ui/omnibarRows.test.mjs"
|
||||
"src/ui/omnibarRows.test.mjs",
|
||||
"src/ui/styles/omnibar-dock.css",
|
||||
"src/ui/styles/guide.css",
|
||||
"src/ui/commandDock.test.mjs"
|
||||
]
|
||||
@@ -289,7 +289,23 @@
|
||||
"src/render/modelParts.js",
|
||||
"src/ui/views/panels/AircraftModelHero.vue",
|
||||
"src/data/retryableLoad.js",
|
||||
"src/data/local_data/wikidata_places/files.js"
|
||||
"src/data/local_data/wikidata_places/files.js",
|
||||
"src/ui/views/panels/Omnibar.vue",
|
||||
"src/exclusiveSurfaces.js",
|
||||
"src/geoDistance.js",
|
||||
"src/ui/omnibarGuide.js",
|
||||
"src/cityPois.js",
|
||||
"src/search/photonSetting.js",
|
||||
"src/sources/requestDeadline.js",
|
||||
"src/ui/omnibarEnter.js",
|
||||
"src/ui/omnibarIntent.js",
|
||||
"src/data/placeNames.js",
|
||||
"src/search/plusCode.js",
|
||||
"src/keylessGeocoder.js",
|
||||
"src/ui/omnibarRows.js",
|
||||
"src/search/gridReference.js",
|
||||
"src/search/coordinateParser.js",
|
||||
"src/search/placeSuggestions.js"
|
||||
],
|
||||
"external": ["vue", "pinia", "vue-i18n"]
|
||||
},
|
||||
@@ -1657,7 +1673,8 @@
|
||||
"src/ui/entityContextBridge.js",
|
||||
"src/data/trackingClickGesture.js",
|
||||
"src/ui/stores/sceneSharing.js",
|
||||
"src/maps/attribution.js"
|
||||
"src/maps/attribution.js",
|
||||
"src/data/dataCredits.js"
|
||||
],
|
||||
"external": [
|
||||
"cesium",
|
||||
|
||||
@@ -372,9 +372,13 @@ const strip = computed(() => {
|
||||
return all.length ? { title, chips: all } : null;
|
||||
});
|
||||
|
||||
/** Fly to a place by its coordinates, as a looked-up place row does. */
|
||||
async function goTo({ name, latitude, longitude }) {
|
||||
if (runner.value) return settled(await runner.value('fly_to_location', { latitude, longitude, query: name }));
|
||||
/**
|
||||
* Fly to a place by its coordinates, as a looked-up place row does. Only the
|
||||
* coordinates go: with its name, "Paris, Texas" would fly to the city
|
||||
* preset Paris.
|
||||
*/
|
||||
async function goTo({ latitude, longitude }) {
|
||||
if (runner.value) return settled(await runner.value('fly_to_location', { latitude, longitude }));
|
||||
const location = locationStore.controls;
|
||||
if (!location || location.destroyed) throw new Error();
|
||||
await location.search(`${latitude}, ${longitude}`);
|
||||
@@ -820,7 +824,8 @@ async function choose(item, { viaKey = false } = {}) {
|
||||
else if (item.kind === 'count-show' || item.kind === 'place') {
|
||||
const { coords, place } = item;
|
||||
if (coords && runner.value) {
|
||||
if (!settled(await runner.value('fly_to_location', { ...coords, query: place }))) return;
|
||||
// The coordinates alone: a name would win over them (see goTo).
|
||||
if (!settled(await runner.value('fly_to_location', { ...coords }))) return;
|
||||
} else {
|
||||
const location = locationStore.controls;
|
||||
if (!location || location.destroyed) throw new Error();
|
||||
|
||||
Reference in new issue
Block a user