immich icon indicating copy to clipboard operation
immich copied to clipboard

Added AssetGrid/Timeline to Map

Open RBedbur opened this issue 10 months ago • 2 comments

Description

Added an AssetGrid/Timeline to map page. By default the grid is closed to avoid loading a large set of timebuckets and images. When Grid is opened it updates when map is zoomed or relocated.

Implements feature #4519

Code partly from discussion #11893

Did not add an option to mapsettings. The grid is always available (but closed).

Next steps: Show App Bar, when images are selected in grid. Right now nothing happens on selecting images. Show images from the same timeframe as the current images shown in grid. This could be useful when shooting with a phone (geolocation is set) and a mirrorless camera (without geolocation).

How Has This Been Tested?

Manually tested with 6000 geolocated images and around 1300 images per location.

Screenshots (if appropriate)

image image

API Changes

api/timeline/buckets and api/timeline/bucket accept coordinates as x1, x2, y1, y2 parameters updated TimeBucketDto

Checklist:

  • [X ] I have performed a self-review of my own code
  • [ ] I have made corresponding changes to the documentation if applicable
  • [ X] I have no unrelated changes in the PR.
  • [X ] I have confirmed that any new dependencies are strictly necessary. (no new dependencies)
  • [ ] I have written tests for new code (if applicable)
  • [X ] I have followed naming conventions/patterns in the surrounding code
  • [ X] All code in src/services uses repositories implementations for database calls, filesystem operations, etc. (no new code)
  • [ X] All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services) (no new code)

RBedbur avatar Mar 02 '25 16:03 RBedbur

Does this truly need server modifications? Just wondering because such a feature is present on the mobile app already.

YarosMallorca avatar Mar 04 '25 23:03 YarosMallorca

The mobile app can query the local database.

jrasm91 avatar Mar 05 '25 00:03 jrasm91

This type of query won't perform very good on a lot of assets. Zack and I talked about adding a polygon based index, similar to the other geocoding stuff that we already have.

jrasm91 avatar Mar 08 '25 22:03 jrasm91

This type of query won't perform very good on a lot of assets. Zack and I talked about adding a polygon based index, similar to the other geocoding stuff that we already have.

Ok. That means? I just refactored / cleaned the code and implemented all comments from @danieldietzler.

Cann you point me to some code, where you implemented the polygon based index?

RBedbur avatar Mar 08 '25 22:03 RBedbur

Awesome PR, I was about to look into implementing something similar. Is there anything in particular that we can do to help get this merged? :)

PaulSonOfLars avatar Jun 18 '25 06:06 PaulSonOfLars

Thanks for the feedback. The last thing I heard about were thoughts about performance, which is understandable as there is a lot of data loaded from the server to place the markers on the map. @danieldietzler any idea how to go on?

RBedbur avatar Jun 21 '25 06:06 RBedbur

As jrasm already said the key here is probably to fetch assets that are currently in frame. I don't really have experience with polygon/geospatial indices though. That's probably something @zackpollard could chime in on.

danieldietzler avatar Jun 21 '25 09:06 danieldietzler

As jrasm already said the key here is probably to fetch assets that are currently in frame. I don't really have experience with polygon/geospatial indices though. That's probably something @zackpollard could chime in on.

Don't currently have that all in my head, would need to look into it some more before I could comment on it, but there should be an efficient way for us to query like this without using PostGIS. I don't really have time to look into this right now though.

zackpollard avatar Jun 22 '25 12:06 zackpollard

I would love to see this feature released someday.

Unfortunately I have zero skills to help, but I have a comment on the appearance: since most desktop screens are horizontal a vertical split dual pane would be way more efficient.

pardon the atrocious photoshop work on the original screenshot:

418361250-09224d68-beda-43db-a70e-27aa08bfaa20

pizzabackup avatar Aug 23 '25 11:08 pizzabackup

Is this still being worked on?

SenderLibs avatar Sep 26 '25 17:09 SenderLibs

This PR as-is is probably unlikely to get merged at this point. For one it requires some thinking about how to make the look ups efficiently. Also, the whole web timeline is currently undergoing a huge refactor, which will render most of the frontend work here obsolete or at the very least incompatible. (also, the PR is like >2000 commits behind which will be incredibly painful to rebase 😅) We'll hopefully get this feature implemented eventually (primarily when the dust around the web timeline settles), sorry!

danieldietzler avatar Oct 14 '25 10:10 danieldietzler