bpatrik / pigallery2

A fast directory-first photo gallery website, with rich UI, optimized for running on low resource servers (especially on raspberry pi)
http://bpatrik.github.io/pigallery2/
MIT License
1.76k stars 202 forks source link

Open photos from a map #175

Open dbogdanov opened 4 years ago

dbogdanov commented 4 years ago

Currently, when browsing a map one can preview the photos by clicking on them, but it is not possible to open those photos like when browsing an album.

jezikk82 commented 3 years ago

It'd be nice to have option to open:

  1. Album/folder that photo belong
  2. All photos take in the same place/area (some small radius, ~ 500m-1km)

Moreover, please add option to settings or config.json to set default zoom on the map presented next to individual photo.

bpatrik commented 3 years ago

All photos take in the same place/area (some small radius, ~ 500m-1km)

You can do such a search already 5-km-from:(New York) # photos 5 km from the center of New York

jezikk82 commented 3 years ago

Sorry but the search query for some strange reasons work only with bigger cities. When you put small town, village, different rural area I return 0 results. At the same time on the map I see that pictures.

bpatrik commented 3 years ago

That is odd. I'm using: https://github.com/nchaulet/node-geocoder#readme to get the gps coordinate for a village.

It hapends here: https://github.com/bpatrik/pigallery2/blob/bae5559356e4d4320425415696e6fd6d24e5fc04/src/backend/model/database/LocationManager.ts#L14-L28

And it works for my little town (population < 3000) in Europe.

There might be some issue with it close the to zero and max coordinates.

jezikk82 commented 3 years ago

I checked over 20 small locations in 3 countries and found couple of places that are shown on the maps but can't be found. I checked in different gallery soft those pics and according to 'map box API' the address is different then the place on the map. I think it's some bug in the map provided. (geo encoding).

jezikk82 commented 3 years ago

I'm also in Europe (Central part of it).

bpatrik commented 3 years ago

Can you give a not working example? Also include the full search query that u use.

jezikk82 commented 3 years ago

10-km-from:Ujazd GPS from photo: 50.137772,19.819286 Xiaomi phone decode this cords as Ujazd 74, 32-080 Poland

bpatrik commented 2 years ago

Sorry for the delay: For Ujazd this is what it finds:

[
  {
    latitude: 51.5997334,
    longitude: 19.9210685,
    formattedAddress: 'Ujazd, gmina Ujazd, powiat tomaszowski, województwo łódzkie, 97-225, Polska',
    country: 'Polska',
    city: 'Ujazd',
    state: 'województwo łódzkie',
    zipcode: '97-225',
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
  {
    latitude: 50.3892513,
    longitude: 18.3504502,
    formattedAddress: 'Ujazd, gmina Ujazd, powiat strzelecki, województwo opolskie, Polska',
    country: 'Polska',
    city: 'Ujazd',
    state: 'województwo opolskie',
    zipcode: undefined,
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
  {
    latitude: 50.1370556,
    longitude: 19.8182426,
    formattedAddress: 'Ujazd, gmina Zabierzów, powiat krakowski, województwo małopolskie, Polska',
    country: 'Polska',
    city: 'Ujazd',
    state: 'województwo małopolskie',
    zipcode: undefined,
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
  {
    latitude: 50.7133276,
    longitude: 21.3105453,
    formattedAddress: 'Ujazd, gmina Iwaniska, powiat opatowski, województwo świętokrzyskie, Polska',
    country: 'Polska',
    city: 'Ujazd',
    state: 'województwo świętokrzyskie',
    zipcode: undefined,
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
  {
    latitude: 51.944826,
    longitude: 19.0639779,
    formattedAddress: 'Ujazd, gmina Wartkowice, powiat poddębicki, województwo łódzkie, 99-220, Polska',
    country: 'Polska',
    city: 'Ujazd',
    state: 'województwo łódzkie',
    zipcode: '99-220',
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
  {
    latitude: 53.9347142,
    longitude: 16.4524477,
    formattedAddress: 'Ujazd, gmina Bobolice, powiat koszaliński, województwo zachodniopomorskie, 76-020, Polska',
    country: 'Polska',
    city: 'Ujazd',
    state: 'województwo zachodniopomorskie',
    zipcode: '76-020',
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
  {
    latitude: 53.0030207,
    longitude: 17.5129951,
    formattedAddress: 'Ujazd, Tupadły, gmina Kcynia, powiat nakielski, województwo kujawsko-pomorskie, 89-240, Polska',
    country: 'Polska',
    city: 'Tupadły',
    state: 'województwo kujawsko-pomorskie',
    zipcode: '89-240',
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
  {
    latitude: 50.6938889,
    longitude: 20.3897222,
    formattedAddress: 'Ujazd, Mnichów, gmina Jędrzejów, powiat jędrzejowski, województwo świętokrzyskie, Polska',
    country: 'Polska',
    city: 'Mnichów',
    state: 'województwo świętokrzyskie',
    zipcode: undefined,
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
  {
    latitude: 51.6254831,
    longitude: 17.4411319,
    formattedAddress: 'Ujazd, gmina Cieszków, powiat milicki, województwo dolnośląskie, Polska',
    country: 'Polska',
    city: 'Ujazd',
    state: 'województwo dolnośląskie',
    zipcode: undefined,
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  },
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  }
]

And uses the first result. i.e.: latitude: 51.5997334, longitude: 19.9210685,

bpatrik commented 2 years ago

To find a different city, try a more specific search. 10-km-from:(Ujazd, Tupadły), uses:

[                                                                                                                      
  {                                                                                                                    
    latitude: 53.0030207,                                                                                              
    longitude: 17.5129951,                                                                                             
    formattedAddress: 'Ujazd, Tupadły, gmina Kcynia, powiat nakielski, województwo kujawsko-pomorskie, 89-240, Polska',
    country: 'Polska',                                                                                                 
    city: 'Tupadły',
    state: 'województwo kujawsko-pomorskie',
    zipcode: '89-240',
    streetName: undefined,
    streetNumber: undefined,
    countryCode: 'PL',
    neighbourhood: '',
    provider: 'openstreetmap'
  }
]
mfaber commented 2 years ago

This is indeed a feature that would greatly enhance the use of the map view. I often use the map to find specific photos. If found on the map, there's no easy way to see this (and the following or previous photos) in full resolution (only a large thumbnail available on the map).

I'd like to suggest that clicking on the photo in the map view leads to the fullscreen view of the photo in the standard folder view mode (where you can then move forward or reverse through the photos as usual). Clicking the (X) would return the user to the map view again (position of the current photo in full view or the photo that was clicked on in map view, originally).

yllekz commented 2 months ago

I'd love this feature. I just moved over to this from Photoview and the one feature that this doesn't have is a general map that plots all the photos on it.

karolleon commented 4 weeks ago

Yes, please add this feature! The app is so close to fulfilling my dream of having a simple way to show my hikes and photos to friends and family. I would like to show them a map of GPX tracks (already possible) with photos, not just thumbnails.