Add Google Maps to default basemap.
이전 댓글 표시
Hello, I have the Mapping toolbox and a Google API key. How do I add Google as a basemap? It is not clear from the addCustombasemap documentation.
댓글 수: 1
SK- II
2021년 3월 24일
Hello Sanjay:
I face the same issue to you.I'm trying sloving it.Do you have some addvice?
채택된 답변
추가 답변 (2개)
Ehsan Jalilvand
2021년 9월 23일
편집: Ehsan Jalilvand
2021년 9월 23일
1 개 추천
To add google satellite basemap you can use the following code:
ax = geoaxes;
name = 'googleSat'; url = 'https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}';
addCustomBasemap(name,url)
geobasemap(ax,name)
you can also use other basemaps by changing the URL and choosing a new name for them, here are some other name/URL pairs:
name = 'BingAerial'; url = 'http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1';
name = 'GoogleHybrid'; url = 'https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}';
name = 'openStreetMap'; url = 'http://tile.openstreetmap.org/{z}/{x}/{y}.png';
- Ehsan
댓글 수: 2
Xiwen Kang
2022년 9월 7일
Thank you very much. This is very helpful.
KSSV
2025년 7월 21일
To use this along with labels: use the url:
url = 'https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}';
카테고리
도움말 센터 및 File Exchange에서 Web Map Service에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!