Change color of lands and waters in geobasemap

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)

 채택된 답변

Taylor
Taylor 2025년 12월 8일

1 개 추천

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.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Oceanography and Hydrology에 대해 자세히 알아보기

질문:

Sim
2025년 12월 8일

댓글:

Sim
2025년 12월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by