Change color of lands and waters in geobasemap
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sim
el 8 de Dic. de 2025 a las 21:21
Comentada: Sim
el 8 de Dic. de 2025 a las 22:39
I see that we can "Edit a predefined style — Editing a predefined style is available for vector basemaps added from MBTiles files".
However, how can I modify the colors used for land and water? For example, the current map shows land in green and water in light blue, but I would like to customize these colors. How can I access and change the exact color values?
mbtilesFilename = "naturalearth.mbtiles";
if ~isfile(mbtilesFilename)
mbtilesFullPath = fullfile(matlabroot,"toolbox","map","mapdata",mbtilesFilename);
copyfile(mbtilesFullPath)
end
basemapName4 = "bluegreenstyle";
addCustomBasemap(basemapName4,"naturalearth.mbtiles",Style="bluegreen")
geobasemap(basemapName4)
0 comentarios
Respuesta aceptada
Taylor
el 8 de Dic. de 2025 a las 22:17
If you have the JSON file (as shown in the example above the one you linked), you can directly edit the "fill-color" property in layers like "land", "ocean", etc. to use the hex color you prefer.
Más respuestas (0)
Ver también
Categorías
Más información sobre Oceanography and Hydrology en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
