esm7/obsidian-map-view

"Map follows search results" seems not to work

Darkbluetest opened this issue · 10 comments

Hi

What this option is supposed to do? When I click in a note in the explorer or graph view that is also shown in the map, the map does nothing, does not center neither zooms in. When I do a search for tags, nothing changes neither, nor if I do a search in the "Filter" option of Map View itself.

Could someone please, tell me how this option works?

It is a real pity for me, that this plugin seems to be unidireccional, I mean you can click notes in map to open them, but not the other way around. Is a way to do that? By clicking the note from explorer or graph view? It is really slowing a lot the work, and limiting the usefulness of this plugin, imo.

esm7 commented

Hi,

  1. When "map follows search results" is turned on, when you add tags to the filters, the map is supposed to zoom to fit them. I just tested it to verify that it still works in the latest version and at least to me it does. If that's not the behavior you're seeing, can you post a GIF/video showing what you're doing, preferably together with the Obsidian developer console open?

  2. The map following notes that open through the explorer or graph view is a really cool that that I never considered. I really like that and will add to my list. However seems like it needs to be limited to front-matter notes, unless you have a better idea for a user experience that will also include inline geolocations?

  3. What do you mean by the plugin being unidirectional? There are multiple ways to open the map from a note. If it's a frontmatter-encoded note you have "show on map" from the note's context menu, and either way you can right-click the location and choose "show on map". #2 above could really contribute to some workflows though.

Hi, thanks a lot for these answers, I'll start by the last one:

(3). I agree I have been somewhat imprecise and harsh with my comment. I apologize. I meant just what you describe in the point 2. By the way the "show on map" only works for the front matter location (see my suggestion for point 2)

(1). Thank you for explanation in point 1, it is clear now. I confirm it works on my side.

(2). Yes I meant that, and for inline geolocations, yes I suggest that the map zooms just to fit all the geolocations in the note, i.e. to zoom in to the smallest box that includes all the geolocations in the note. Of course if they are completely far away, the zoom can take the whole world, but it is logical, imo.

Another suggestion regarding (2), maybe when a note is selected, in addition to zoom and center the map, it could highlight in some way (increasing marker size, whatever...) the locations on map related to the selected note. Just to make easier to locate them visually just in case the map is full of marks already.
Another option could be to hide all the other locations not belonging to the selected note, just as "filter" option does, but I don't like it, it is a bad idea as it may be needed/interesting to see the note's location side by side other relevant locations that belong to other notes. So I prefer the first option I described.

esm7 commented

I'm currently working on more powerful filtering/querying feature, so I think what you are describing can perfectly accompany that. I'll add a "focus current note on map" context menu item that will open Map View with a query that shows just the geolocations in the active note.

This "focus current note on map" context item, would not be similar to "show on map"? I mean, you have to right click the note each time to select it? If so, it does not seem too dynamic or different. Maybe I did not understand you, though.

esm7 commented

I think it makes sense to do both:

  1. A "focus current note on map" context item, that is similar to "show on map" but for a complete note.
  2. Hook into Obsidian's "link pane" functionality, to connect a map view to another pane, and then follow any note opened in that pane.
    What do you think, does that make sense?

Hi, yes I think so. I understand now.

For the option 2, this means that in graph view, we have to have a pane opened for the note to open in, but I think this is std for Obsidian (is it possible to click on a note on graph view and NOT open it in a pane? )

On the other hand, if we have two panes with two different notes, and one pane is linked to map, how will react the map if we select the other pane? Is it possible that the map link will change to the new pane?

esm7 commented

Would a more simple "follow open note", that focuses the map on whatever note is open or focused, work better for your flow? This is considerably simpler to implement than the links idea :)

Well, I confess I do not have the knowledge to see the technical differences. But as you described the "follow open note" option, I understand that the only difference -from user point of view- is that "follow open note" will allow map to follow a focused note whichever it is and whenever it is opened, meanwhile the "link pane" approach is linked to a specific pane. If my understanding is correct, then I would prefer the "follow open note" approach, sure.

esm7 commented

Added in the just-released 2.0.0 version.