Make destination offset and track width configurable in the map

Started by lbo, March 27, 2019, 04:41:21 PM

Previous topic - Next topic

lbo

Two settings in the Map Panel are hard coded but not suitable for every user:

1. The offset of a newly created destination marker.

Currently, the code in maputility.js is
var dlat = lat + 0.0005;  // about 50 m
that's way too near if your object is at one km distance because you can't grab the marker easily. I currently patch it to lat + 0.005.

2. The track width

Unless you have a high dpi monitor, the current setting is too high. Using a 110PPI monitor, I patch the value to 3 pixels:

olmap.js: width: 3,
gmaps.js: var lineWeight = 3;

This has already been discussed in https://www.photools.com/community/index.php?topic=8233 started by Mees Dekker, supported by Carlo Didier, sinus and me. Screenshots are provided there.

Maybe you find a quick solution to incorporate configuration options for the small code changes I demonstrated above without blowing up the preferences dialog. Please don't spend "at least 1/2 to 1 developer day" as you estimated earlier.

Maybe you can use a text based configuration file?

Otherwise I keep patching the files which can be done in a half-automated way.

Oliver

lbo

I forgot to mention that the destination marker offset might be calculated relative to the zoom level resp. window size, e.g. 1/4 window height. This way, no configuration is needed.


jch2103

Quote from: lbo on March 27, 2019, 11:57:54 PM
I forgot to mention that the destination marker offset might be calculated relative to the zoom level resp. window size, e.g. 1/4 window height. This way, no configuration is needed.
+1
John