owntracks / recorder

Store and access data published by OwnTracks apps
Other
888 stars 122 forks source link

Some problems with Google Maps #187

Closed simonszu closed 7 years ago

simonszu commented 7 years ago

Hi,

i have noticed some quirks with the Google Maps view. The first one: I have created and added a OTR_BROWSERAPIKEY to ot-recorder. However, when i open a Google Maps View and look at its source code, especially at static/apikey.js, it is empty:

var apiKey = '';

The second one: Mouse Wheel zooming isn't enabled on the Google Maps views. This is, because the setting is hardcoded in https://github.com/owntracks/recorder/blob/c1a1701c8df6d466bcb07932ef135b6811b26904/docroot/map/map_google.js#L31

This may be okay because Google Maps autozooms to fit the track/points, but feels weird, at least for me, because i use mouse wheel scrolling on Google Maps so intuitively, i am missing it on ot-recorder.

jpmens commented 7 years ago
  1. You say _I have created and added a OTRBROWSERAPIKEY to ot-recorder. What does that mean? Added how? To the defaults file? Is it commented out?
  2. Mouse wheel zooming is disabled because I hate the default enabled. If you (or somebody else) comes up with an elegant way of making this configurable, I'd take a pull-request. :-)
simonszu commented 7 years ago
  1. Nevermind. Somehow my ansible playbook was messed up - i restarted the service manually and not via ansible, and everything's fine.

  2. I am not really able to create a full pull request, since i have little to no knowledge to C, but maybe a environment variable called OTR_SCROLLWHEELONMAPS with the default set to false - and then reading and parsing it like the OTR_BROWSERAPIKEY. Hmmm, to be honest, i can work through your code, and create an option for this - should be pretty straightforward, since it should work almost exactly like OTR_BROWSERAPIKEY. Maybe someday when i have some spare time ;)

jpmens commented 7 years ago

Deal -- I've assigned this to you. ;-)