diff --git a/apps.json b/apps.json index 48946c221..a8fe0a2ab 100644 --- a/apps.json +++ b/apps.json @@ -1193,7 +1193,7 @@ "name": "OpenStreetMap", "shortName":"OpenStMap", "icon": "app.png", - "version":"0.02", + "version":"0.03", "description": "[BETA] Loads map tiles from OpenStreetMap onto your Bangle.js and displays a map of where you are", "tags": "outdoors,gps", "custom": "custom.html", diff --git a/apps/openstmap/ChangeLog b/apps/openstmap/ChangeLog index 2d60cb688..a7b8065fa 100644 --- a/apps/openstmap/ChangeLog +++ b/apps/openstmap/ChangeLog @@ -1,2 +1,3 @@ 0.01: New App! 0.02: Fix marker position, color, and map scaling +0.03: Show widgets (mainly so we can use the GPS recorder widget) diff --git a/apps/openstmap/app.js b/apps/openstmap/app.js index ae4817f16..5be4be82a 100644 --- a/apps/openstmap/app.js +++ b/apps/openstmap/app.js @@ -1,11 +1,12 @@ var s = require("Storage"); var map = s.readJSON("openstmap.json"); +var HASWIDGETS = true; +var y1,y2; map.center = Bangle.project({lat:map.lat,lon:map.lon}); var lat = map.lat, lon = map.lon; var fix = {}; - function redraw() { var cx = g.getWidth()/2; var cy = g.getHeight()/2; @@ -17,6 +18,7 @@ function redraw() { var ty = 0|(iy/map.tilesize); var ox = (tx*map.tilesize)-ix; var oy = (ty*map.tilesize)-iy; + g.setClipRect(0,y1,g.getWidth()-1,y2); for (var x=ox,ttx=tx;xWIDGETS[w].area[0]=="b"); + y2 = g.getHeight() - (hasBottomRow ? 24 : 1); +} else { + y1=0; + y2=g.getHeight()-1; +} + redraw(); setWatch(function() {