Closed craftyguy closed 3 years ago
I tried changing them in the DEFAULT
dict in config.py
, but it still defaulted to using mapbox/stadia
Here's the patch I hacked up:
diff --git a/poor/config.py b/poor/config.py
index 33228c5..81dd7d4 100644
--- a/poor/config.py
+++ b/poor/config.py
@@ -72,16 +72,16 @@ DEFAULTS = {
"profile": "online",
"profiles": {
"mixed": {
- "basemap": "Mapbox",
+ "basemap": "opencyclemap",
"geocoder": "photon",
"guide": "foursquare",
- "router": "stadiamaps"
+ "router": "osrm"
},
"online": {
- "basemap": "Mapbox",
+ "basemap": "opencyclemap",
"geocoder": "photon",
"guide": "foursquare",
- "router": "stadiamaps"
+ "router": "osrm"
},
"offline": {
"basemap": "OSM Scout",
Ideally there would be a build-time option for selecting these, e.g. something like:
make CFLAGS="-DDEFAULT_MAPBASE=opencyclemap -DDEFAULT_ROUTER=osrm"
since carrying around an out of tree patch to do this is less than ideal for packagers.
Changing the DEFAULT should be sufficient. Make sure that you remove configs from ~/.config before testing. After Pure Maps start, it will write configuration file and even if you change defaults the user settings are preferred. If you wipe the configs, it should work.
@PureTryOut : The preference of these providers was set as
I don't mind having a build option in make
. Notice that right now we don't compile anything, but this will most probably change as I get time to rewrite navigation part with C++ main() expected then.
As build system is expected to change, maybe you should use a patch for now and make proper selector later when the build system will stabilize.
Thanks for the help. I think I got something that works, took me a while to figure out the correct names/casing..
Fix will come out with the next release with the options described in README (branch not merged yet, see commit above). Closing
Awesome, thank you for implementing this!
Is there a 'supported'/recommended way to change the basemap and routing providers at build time, e.g. change from mapbox to opencyclemap, etc?
poor/config.py
seems relevant, but wanted to ask here in case there's some better wayhttps://github.com/rinigus/pure-maps/blob/master/poor/config.py#L75