rinigus / pure-maps

Maps and navigation
https://rinigus.github.io/pure-maps/
GNU General Public License v3.0
252 stars 43 forks source link

Support Google Maps as a provider #537

Open ddobrev opened 3 years ago

ddobrev commented 3 years ago

Google Maps is (unfortunately) still the best provider for a reason no other than people being more used to enter addresses of establishments there. I would therefore like to suggest supporting it as a provider in Pure Maps as long as it's technically and legally possible.

rinigus commented 3 years ago

I haven't looked into it, as I assumed it is not very 3rd party friendly. If you are interested, look into their terms and conditions as well as how do they support external clients. I suspect we have a better chance with HERE (#275)

ddobrev commented 3 years ago

I've read a little about it (in fact, I had assumed you knew better). They require an API key passed with each request and if the requests are worth more than $200 a month, they start charging the card entered during the registration for the key. There supposedly are or were other approaches meant for testing such as getting a lower resolution or a watermark saying "For Development Purpose Only". However, looking at https://cloud.google.com/maps-platform/pricing/sheet, it seems that $200 is quite a few for a single user. So would you please consider the same approach you already use for Mapbox: require your users to provide their own API key? In this case I think you can safely support this provider with no cost to you and to the overwhelming majority of your users.

rinigus commented 3 years ago

No, I haven't looked into it as some time ago there was a major exodus from Google Maps due to their price increase. As their payment options are rather elaborate, I don't know how it compares to others - I can only assume it is expensive. Whether they allow to let users to use API keys, no idea. That should be covered in the terms somewhere. For Mapbox, I asked what to do and they suggested this solution.

I will keep this issue open and let's see if someone will be interested in looking into legal details and implement the support accordingly. See HERE issue as an example on how it is approached over there and notice that we need special treatment for HERE due to their legal conditions.

ddobrev commented 3 years ago

Thank you for keeping it around. I'll be sure to post anything new I'm able to learn, especially about the legal terms.

rinigus commented 3 years ago

Sure, let's see where it brings us.

rinigus commented 3 years ago

I've used 3 locations which aren't widely known but important to me i.e. the perfect test subjects.

  1. "HERE WeGo" finds all of them but I don't like its view. It doesn't show names of nearby locations unless the map's heavily zoomed in. This makes it look clearer and prettier than Google Maps which is riddled with text. Unfortunately, this is a map which means prettiness is much less important than usefulness. I tried finding some settings to show as much text as possible by default but to no avail. I can't tell how well the display of text can be managed from HERE's API. Moving on, since I saw HERE as an option in PureMaps - even though you supposedly don't support it yet - I decided to try it there. I was again surprised it wasn't consistent with "HERE WeGo" by failing to find one of the locations. I thought the problem was my lack of an app id and code so I registered in HERE, created an app and provided them. No difference in behaviour even after restarting PureMaps;

Pure Maps can mix providers for map tiles, search, and routing. Right now, HERE is supported only for showing map tiles. So, what you selected, was only to see maps, but not to search using it. Search providers are listed under search page, as an option. This can all be adjusted on fly, no need to restart Pure Maps

  1. OpenStreetMaps was, to my surprise, able to find through its web-site a second location of my three. This made me wonder why PureMaps couldn't since it uses MapBox by default which in turn lists OSM as one of its sources;

Default provider for online search is Photon https://photon.komoot.io/. That should correspond to what we have in Pure Maps. OSM is using different search engine. You could check if OpenCage is better for you. But to use HERE, we will need to add it as a provider for search (and routing)

ddobrev commented 3 years ago

Thank you for the tip, OpenCage does work as good as OSM's web-site. Interesting that Photon claims to use OSM as well, but its results are worse. Is there a reason you've selected it as the default rather than OpenCage? Thank you for the explanation about searching with HERE. I'll write more in the relevant issue.

rinigus commented 3 years ago

Photon was selected as they support search-as-you-type, which is handy. And I haven't seen yet where Photon was worse than OpenCage, but haven't done much of research on that topic either.