esm7 / obsidian-map-view

Interactive map view for Obsidian.md
MIT License
548 stars 25 forks source link

Feature Request - Add additional Metadata from GMaps/OpenstreetMaps to the note #173

Open combbbb opened 12 months ago

combbbb commented 12 months ago

hi,

would it be possible to implement more metadata when creating a new note with a geolocation eg. name of the street, number, city, name of the place (e.g. restaurant name) and stuff like that. also the name of the place as the filename?

thanks!

esm7 commented 11 months ago

That's indeed very useful, and template arguments can be added that will be replaced by these values. Thanks for the idea!

handle8xyz commented 10 months ago

I totally agree. Right now, the Google API is connected but I feel like the data (coordinates) it pulls is too limited. For my mapping, I’m doing a few steps to make this full-featured:

  1. Use the map-inline autocomplete to pull the coordinates
  2. Go to Google Maps to save the URL to the actual location
  3. Adding metadata

This way, when I want to go to the place, I have a link that pulls up the Google Maps location with up-to-date information (hours, store website, pictures, etc). As you know, the coordinates do not always match the “true” location as seen Google Maps.

Ideally, the autocomplete would pull three pieces of info for me:

  1. Coordinates for the Obsidian offline map
  2. Full name of the auto-completed match (instead of having to retype the full proper name)
  3. Google Maps link for easy access to additional up-to-date info
  4. Location info (eg, type of business, city, country) for easy searchability if I decide not to add metadata

If we can customize what is pulled from the Google Maps API, that would be amazing. Not sure about the dollar cost of using the API frequently but the time saving feature of this is likely worth the cost (above the free monthly credits we already get from Google)!

Thank you

esm7 commented 10 months ago

Are you guys using the Google Places API or the more generic Google default with an API key? I think it would make the most sense to do this specifically for Google Places, as it is most elaborate, and on the other hand a generic implementation for all the possible providers (OSM, Google Geolocation and Google Places) requires lots of duplicate work.

handle8xyz commented 10 months ago

Hi @esm7 , I'm using the Google Places API ** sorry for the mix up. Getting the Places API key was recommended to get higher-quality results, so naturally I got one. There's a $200 monthly credit, and it costs about 1-5 cents per search. That's more than enough for my personal use.

Maybe just have a dedicated section in the plugin settings for "Users who have Google Places API" ? There's currently no plugins that are using the Places API except yours so hopefully you are able to implement this feature!

ngracilla commented 10 months ago

I'm using the default OSM geocoding, and echo the usefulness of this idea when creating a geolocation note. Note name as place name would be ideal; capturing the address in body or in YAML would be great, too.