Darakah / obsidian-gallery

Main Gallery to tag / filter / add notes to images. Display blocks to embed images inside notes. Display block to an image information
132 stars 15 forks source link

GEO - tagging? #13

Closed denemier closed 3 years ago

denemier commented 3 years ago

hey i didn't want to ask you this feature before archiving problem because it was more important, so looks like you are familiar with map systems too, what about: 1-gallery view on map mode like search button and view all media files on the Openstreet Map tagged by a geo tag (long,lat ..)inside the info file, and clickable feature to view original file like your gallery's main screen 2-and also adding the map to sidebar info panel below the images color palette feature for viewing a single images location as well

i checked the geolocations in popular web maps url's as parameters this is what i found 35.4695999464887,19.667745537687807 for google with comma 35.4695999464887/19.667745537687807 for openstreetmap with slash 19.667745537687807,35.4695999464887 for yandex maps 35.4695999464887,19.667745537687807 for bing searchbox no parameter in urlbar

so maybe like this format? this location i mention should show Mediterranean Sea geolocation:35.4695999464887,19.667745537687807

denemier commented 3 years ago

but i am not sure how they know if a longitude is east or west, shouldn't we add E, W to the end of longitude coordinate

denemier commented 3 years ago

so it looks like they add - (minus sign) before the coordinate geolocation:-35.4695999464887,19.667745537687807 (this means not anymore northern hemisphere instead it is southern because latitude has minus sign before it) image minus sign for longitude for example 19.667745537687807 means east of greenwich -19.667745537687807 west of greenwich

Darakah commented 3 years ago

so looks like you are familiar with map systems too ? I guess you found my world map plugin? 🖌️

You can actually use this already available plugin https://github.com/valentine195/obsidian-leaflet-plugin and simply add a code block inside the info note and you got the small view of where this image geo information is.

Darakah commented 3 years ago

Now for your main world map view thingy, you can actually use my other plugin and it would actually be possible. https://github.com/Darakah/obsidian-map

Didn't make it for public use but for my use case. But simply:

  1. Download the plugin latest release
  2. In the settings tab change the map path to a world map link such as https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png (this will show the earth world map)
  3. Add this info block to each image's info note
<span class="ob-world-map" 
      data-type="Capital"
      data-loc="9.380052 / 9.969492"
      data-dateStart="20"
      data-dateEnd="90"
      data-icon="map-marked-alt"
      data-color="red"
      data-marker='<img class="map-custom-marker-img" 
               src="app://local/Users/Resources/Icon/Layer_Potion_Shop.png"/>'/>
Darakah commented 3 years ago

where it says data-loc just put the coordinates latitude / longitude (not sure of the order though it has been some time)

Darakah commented 3 years ago

Oh, and to know where you want to place it, you can use the measure tool and just see the coordinates of where you click on the map. (Top left)

denemier commented 3 years ago

yes i saw your plugin, and i am going to review as well after this gallery plugin, its on my list, image i tried leaflet as you said it works fine inside a note's preview mode doesnt display like you said inside info file's preview when added

Darakah commented 3 years ago

Hmmm, dono mate, never used that plugin to be honest. All other block plugins that i use render properly inside the info note. Not sure why this one doesn't seem to work. Need to check with the plugin code, most likely has a check to see whether the file is an md file (and since the side panel is not an md file but a renderer, it is not processing it). Can't change that on my side :p

denemier commented 3 years ago

so looks like gallery plugin doesn't display leaflet block but what i discovered is there is a way around it we can click your open info button in the info panel, and view it like a normal obsidian note instead in the sidebar and it works there at least, so a 1 step way solution around the problem

Darakah commented 3 years ago

so looks like gallery plugin doesn't display leaflet block but what i discovered is there is a way around it we can click your open info button in the info panel, and view it like a normal obsidian note instead in the sidebar and it works there at least, so a 1 step way solution around the problem

Yes .... didn't i mention above that the problem is a check by the leaflet plugin requiring the block to be inside a markdown note instead of a renderer (which is the side panel in the gallery plugin).

denemier commented 3 years ago

but it's showing bold markdown like boldtext inside sidepanel info, maybe its a different as software abstraction for the info panel i guess so if it's just a check problem i see what leaflet plugin community can do, thanks