mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 17:23:21 +03:00
Add reverse geocoding and show asset location on map in detail view (#43)
* Added reserve geocoding, location in search suggestion, and search by location * Added mapbox sdk to app * Added mapbox to image detailed view
This commit is contained in:
@@ -249,7 +249,7 @@ export class AssetService {
|
||||
const possibleSearchTerm = new Set<String>();
|
||||
const rows = await this.assetRepository.query(
|
||||
`
|
||||
select distinct si.tags, e.orientation, e."lensModel", e.make, e.model , a.type
|
||||
select distinct si.tags, e.orientation, e."lensModel", e.make, e.model , a.type, e.city, e.state, e.country
|
||||
from assets a
|
||||
left join exif e on a.id = e."assetId"
|
||||
left join smart_info si on a.id = si."assetId"
|
||||
@@ -274,6 +274,11 @@ export class AssetService {
|
||||
// Make and model
|
||||
possibleSearchTerm.add(row['make']?.toLowerCase());
|
||||
possibleSearchTerm.add(row['model']?.toLowerCase());
|
||||
|
||||
// Location
|
||||
possibleSearchTerm.add(row['city']?.toLowerCase());
|
||||
possibleSearchTerm.add(row['state']?.toLowerCase());
|
||||
possibleSearchTerm.add(row['country']?.toLowerCase());
|
||||
});
|
||||
|
||||
return Array.from(possibleSearchTerm).filter((x) => x != null);
|
||||
|
||||
Reference in New Issue
Block a user