forked from FOSS/BangleApps
update openstreetmap tile provider since although opentopomap has nicer maps, it's too slow/unreliable
parent
f7870c0cab
commit
d546bd0d18
|
@ -10,3 +10,4 @@
|
|||
0.10: Improve scale factor calculation to fix scaling issues (#984)
|
||||
0.11: Add slight offset to OSM data to align it properly (fix #984)
|
||||
Fix alignment of satellite info text
|
||||
0.12: switch to using normal OpenStreetMap tiles (opentopomap was too slow)
|
||||
|
|
|
@ -64,9 +64,10 @@ TODO:
|
|||
var OSMTILECOUNT = 3; // how many tiles do we download in each direction (Math.floor(MAPSIZE / OSMTILESIZE)+1)
|
||||
/* Can see possible tiles on http://leaflet-extras.github.io/leaflet-providers/preview/
|
||||
However some don't allow cross-origin use */
|
||||
var TILELAYER = 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png'; // simple, high contrast
|
||||
var PREVIEWTILELAYER = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
//var TILELAYER = 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png'; // simple, high contrast, TOO SLOW
|
||||
//var TILELAYER = 'http://a.tile.stamen.com/toner/{z}/{x}/{y}.png'; // black and white
|
||||
var TILELAYER = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
var PREVIEWTILELAYER = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
|
||||
// Create map and try and set the location to where the browser thinks we are
|
||||
var map = L.map('map').locate({setView: true, maxZoom: 16, enableHighAccuracy:true});
|
||||
|
@ -128,7 +129,7 @@ TODO:
|
|||
var min = Math.min(rgba[i+0],rgba[i+1],rgba[i+2]);
|
||||
var max = Math.max(rgba[i+0],rgba[i+1],rgba[i+2]);
|
||||
var d = max-min;
|
||||
if (max<120) { // black
|
||||
if (max<120 || (d<8 && max<215)) { // black, or a darker grey
|
||||
rgba[i+0]=0;
|
||||
rgba[i+1]=0;
|
||||
rgba[i+2]=0;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "openstmap",
|
||||
"name": "OpenStreetMap",
|
||||
"shortName": "OpenStMap",
|
||||
"version": "0.11",
|
||||
"version": "0.12",
|
||||
"description": "Loads map tiles from OpenStreetMap onto your Bangle.js and displays a map of where you are. Once installed this also adds map functionality to `GPS Recorder` and `Recorder` apps",
|
||||
"icon": "app.png",
|
||||
"tags": "outdoors,gps,osm",
|
||||
|
|
Loading…
Reference in New Issue