How to embed Google maps into a GUI

21 visualizaciones (últimos 30 días)
ZHOU
ZHOU el 27 de Mzo. de 2024
Editada: ZHOU el 28 de Mzo. de 2024
Greeting to y'all,
I keep trying to embed Google maps into my gui, but I can't make it . It's OK that subsitute Google Earth for Google maps.
Hope u guys can helps me to overcome this Dilemma,and wish y'all have a nice day.

Respuestas (1)

Saurabh
Saurabh el 27 de Mzo. de 2024
Editada: Saurabh el 27 de Mzo. de 2024
Hi ZHOU,
It seems like you are looking to plot a Google Map on the background of the figure.
While going through the MathWorks official documentation, I found out about ‘plot_google_map.m’, which uses the Google Maps API to plot a map in the background of the figure.
I am attaching a sample code for reference:
plot_google_map('apiKey', '<Your_API_Key>') % You only need to run this once, which will store the API key in a mat file for all future usages
lat = [48.8708 51.5188 41.9260 40.4312 52.523 37.982];
lon = [2.4131 -0.1300 12.4951 -3.6788 13.415 23.715];
plot(lon, lat, '.r', 'MarkerSize', 20)
plot_google_map('MapScale', 1)
For a complete understanding of how to use the provided function, you can refer to the documentation below:
I hope this was helpful.
  1 comentario
ZHOU
ZHOU el 28 de Mzo. de 2024
Editada: ZHOU el 28 de Mzo. de 2024
Even though I haven't try these codes out today, but I'm really appreciate your help. I'll try it soon.

Iniciar sesión para comentar.

Categorías

Más información sobre Mapping Toolbox 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!

Translated by