Shows map image around current position. Aimed to give navigation ability for watches without maps and courses.
- As memory is limited, best to use 2 colors image.
- For 2 colors and 16 KB memory - max size is: 2000 x 2000 px.
- As an example, shows world map (based on STyx's map).
- Refreshes only when is visible (auto call
onUpdate()function), to reduce calculations. - Shows static image, no zoom.
- Copy compiled
Map.prgto theAPPS\directory. - Select:
Activity Settings→Data Screens→Screen #→Field #→Connect IQ→Map.
- Image should be black-and-white, 2000 x 2000 px.
- Look for printable/simple/bw/outline maps online, or use map viewer with editable style, or decrease color depth in graphic program.
- Suggestion: you can mark on map some paths and points.
- ImageMagick zip. You can use
portable-Q16version,x86orx64as your system. - OpenSSL zip: curl.se (
Specifications→32bitor64) or bintray.com (version →Files→win32or64). - Dev-kit. Current version requires SDK Manager (login required) to download kit and selected devices.
- ImageMagick: 7.0.11-0 → portable-Q16-x: 86 | 64
- OpenSSL: curl.se 1.1.1i → 32 | 64 or bintray.com 1.1.1h → 32 | 64
- Dev-kit: 3.1.9 → zip - was the last version with
Direct Download(contains kit and all devices).
- Add paths to dirs where unpacked.
- At the end of
Pathvariable, separate by semi-colon;sysdm.cpl→Advanced→Environment Variables...→System variables→Path- Example:
C:\ImageMagick\;C:\openssl\;C:\ciq\bin\ - Then you can use short:
convert,openssl,monkeyc
- Or add before each command:
C:\ciq\bin\monkeyc - If using SDK Manager, then path is:
%AppData%\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-VERSION\bin\
- You can use bat scripts from temp dir
map\. - ImageMagick:
index-colors.bat- simply decrease color depth:convert map-color.png -threshold 70% map.pngcrop.bat- crop prepared map (createmdir first):convert map.png -crop 250x250 m\%01d.png
- Check if map is correctly cropped and copy it to:
resources\mdir. - 2000 x 2000 px cropped to 250 x 250 gives 64 parts (from
0.pngto63.png).
- Check where your map starts (left upper corner) and ends (right down corner).
- And enter those coordinates here (latitude and longitude).
const ut=83.64, un=-180.0, // left upper corner
dt=-66.20, dn=180.0, // right down corner
- Generate key using OpenSSL -
gen_key.bat:
openssl genrsa -out dev_key.pem 4096
openssl pkcs8 -topk8 -inform PEM -outform DER -in dev_key.pem -out dev_key.der -nocrypt
- Replace
DEVICEby your device id (checkmanifest.xmlorbin\devices.xmlat kit) -compile-release.bat:
monkeyc -y dev_key.der -f MapOfflineGPS\monkey.jungle -r -o Map.prg -d DEVICE