Default Basemap terria v8 #5841
-
Hi, Is there a way to change the default base-map in terria v8. also, where could i get the list of base-map Id's? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi @anujdivesh. The default base map is configured in initialization files. See the section on basemaps configuration in our developer docs. There's also a link from there to the list of default basemap & their ids. |
Beta Was this translation helpful? Give feedback.
-
Hi Steve, Perfect. While trying to configure the base-map, it does not seem to be reflecting. Do we have to rebuild anything? |
Beta Was this translation helpful? Give feedback.
-
Hi @anujdivesh, {
... other init config
"baseMaps": {
"enabledBaseMaps": ["basemap-darkmatter","basemap-positron","basemap-natural-earth-II"],
"defaultBaseMapId": "basemap-natural-earth-II"
},
...
} Regarding default-basemap to see the effect of the above configuration you might need to delete a
Value in local storage will be saved every time you change the base map from the |
Beta Was this translation helpful? Give feedback.
-
Hi Thanks so much. It works. |
Beta Was this translation helpful? Give feedback.
Hi @anujdivesh,
Here is a code snippet you posted above that I just tested, you can also test it here http://ci.terria.io/main/#https://gist.githubusercontent.com/zoran995/186b6da410d4ea38b933eaa489b2d58b/raw/844290860f71dd9f17025ee461c11e162b0409a8/gistfile1.json.
Regarding default-basemap to see the effect of the above configuration you might need to delete a
... .basemap
key from the local storage or use incognito mode in the browser. The order of resolving the base maps is