From 7b404cb12f50c0b7cbefae2fce3a740092043a4e Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Mon, 6 Dec 2021 11:09:10 +0000 Subject: [PATCH] remove map from testing - now in openstreetmap --- testing/map/README.md | 3 - testing/map/espruinomap.js | 83 -------------------- testing/map/maploader.html | 155 ------------------------------------- 3 files changed, 241 deletions(-) delete mode 100644 testing/map/README.md delete mode 100644 testing/map/espruinomap.js delete mode 100644 testing/map/maploader.html diff --git a/testing/map/README.md b/testing/map/README.md deleted file mode 100644 index 03705019a..000000000 --- a/testing/map/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This code can take an image file, split it into tiles, and then render those tiles on the watch - making them fit with the GPS data. - -Problem is right now I can't automate getting the rendered area of map, so can't turn it into a very useful tool for BangleApps. diff --git a/testing/map/espruinomap.js b/testing/map/espruinomap.js deleted file mode 100644 index cea770600..000000000 --- a/testing/map/espruinomap.js +++ /dev/null @@ -1,83 +0,0 @@ -require("Storage").write('+map',{ - name:"Map", - icon:"*map", - src:"-map" -}); -require("Storage").write('*map',require("heatshrink").decompress(atob("mEwghC/AH4AWh//mcwBZIWI/4ABmYABBZAgIC4oyDBYggIC4wABBYoX/C90imcykYXUkYBB+YyDC5E/F5EykQXKHwYVCL4YXNkQ+BC4wICHgIvJ+QVBC4oYBkUvO5QXCU4wXBF5INCCwqMDAYTXUC6xHNC5Z3LI5UyF6oADF9ZfL+fTAIIUCkUjR5397s9C4LxBC4MykfzDYYvI7vdC4cyDIciO5c97s/C4QABF4IBBC5QvEAAk/+ZdBC5JfEX6XzmaPEa7oX8+AGBgYXHBYQXHBAoXFCowXCEA4yCBZIA/AH4AO"))); - -require("Storage").write("-map",` -var s = require("Storage"); -var hs = require("heatshrink"); -var map = { - imgx : 831, - imgy : 656, - tilesize : 64, - scale : 20000, - lat : 51.7075, - lon : -1.2948 -}; - - -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; - var p = Bangle.project({lat:lat,lon:lon}); - var ix = (p.x-map.center.x)*4096/map.scale + (map.imgx/2) - cx; - var iy = (map.center.y-p.y)*4096/map.scale + (map.imgy/2) - cy; - //console.log(ix,iy); - var tx = 0|(ix/map.tilesize); - var ty = 0|(iy/map.tilesize); - var ox = (tx*map.tilesize)-ix; - var oy = (ty*map.tilesize)-iy; - for (var x=ox,ttx=tx;x - - - - - - - -

An online map loader for Espruino...

- Scale
- Geo URI
-
-
-
- - -

-
-  
-
-   
- 
-