diff --git a/apps/gipy/app.js b/apps/gipy/app.js index 4bd1adbeb..03e2719ca 100644 --- a/apps/gipy/app.js +++ b/apps/gipy/app.js @@ -1474,6 +1474,62 @@ function start_gipy(path, maps, interests, heights) { } }, }; + try { + // plot openstmap option if installed + const osm = require("openstmap"); + menu[/*LANG*/"Plot OpenStMap"] = function() { + E.showMenu(); // remove menu + + // compute min/max coordinates + let minLat = 90; + let maxLat = -90; + let minLong = 180; + let maxLong = -180; + for(let i=0; imaxLat) maxLat=point.lat; if(point.latmaxLong) maxLong=point.lon; if(point.lon scaleY ? scaleX : scaleY)*1.1); // add 10% margin + osm.lat = (minLat+maxLat)/2.0; + osm.lon = (minLong+maxLong)/2.0; + osm.draw(); + + // draw track + g.setColor("#f09"); + for(let i=0; i