scubajorgen / TomTomWatch

Tool for exporting GPS files from TomTom Sports Watches
84 stars 18 forks source link

Google Maps : Can't get input stream from URL! #13

Closed ABelliqueux closed 5 years ago

ABelliqueux commented 5 years ago

Hi,

In 1.4, the map does'nt show anymore when uploading a route. The error in a terminal is :

ERROR: Unable to get Google map: Can't get input stream from URL!

I suspect this comes from a change in google apis, as I get this message when trying to paste the generated URL in a browser :

The Google Maps Platform server rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account

GPSmaster uses OSM via Mapnik. I think the relevant code is here : https://github.com/cl0ne/GpsMaster/tree/master/src/org/gpsmaster/osm . Would it be difficult to switch ?

Cheers,

scubajorgen commented 5 years ago

Thanx. I noticed. I'll have a look at it. So far no keys required for this google service. However recently google wants to make money with maps. In my online webapps I switched to OSM. However, I don't know yet if OSM will apply to this desktop app... Should be possible I guess.

scubajorgen commented 5 years ago

Added support for the Google Embed API. You need to get a API key from google in order to have the maps shown. Rever to the TomTomWatch.properties file. Based on JxMapViewer2

scubajorgen commented 5 years ago

Added support for Open Street Maps. Select the map service in the tomtomwatch.properties file. Select none, osm (default) or google. In case of google a google API key is required.