Clear Filters
Clear Filters

Plot my GPS loop on google satellite maps.

25 views (last 30 days)
Riddhesh on 8 Nov 2023
Commented: Riddhesh on 8 Nov 2023
I have 14 different .mat files and they are sections of a whole loop. I have the gps plot ready but I need to plot it on a google satellite map.
Lat = Signal_83.y_values.values./3600;
Long = -Signal_82.y_values.values./3600 ;
geoscatter(Lat,Long,'.'); hold on
the above code gives me a plot on an open street map and I need it on a satellite view plot.

Answers (1)

Yash on 8 Nov 2023
Hello Riddhesh,
I understand you want to plot your latitude and longitude data on a Google satellite map. To achieve this. you can use the 'webmap' function in MATLAB from the Mapping Toolbox before plotting the latitude and longitude data on the map. Thereafter, function 'tileLayer' can be used to incorporate a satellite tile layer into a web map. Satellite tile layer refers to a map layer that portrays the Earth's surface through satellite imagery. This layer is typically employed in mapping applications to offer a more comprehensive and lifelike representation of the landscape.
This is how you can add a satellite tile layer to a web map before plotting latitue and longitude data on the map:
WM = webmap('Google'); % creating a web map object
TL = WM.tileLayer('GoogleSatellite'); % adding a satellite tile layer to the map
The above code will create a web map object using the Google Maps API and add a satellite tile layer to the map.
To know more about the Web Map Display and its functions, you can refer to its documentation here:
Hope it helps!
  1 Comment
Riddhesh on 8 Nov 2023
Hello Yash,
Thank for your response. The above code gave me an error as follows,
"The input, 'Google', did not match any of the valid values." the available inputs are openstreet maps,'DeLorme World Basemap', 'Light Gray Canvas Map', 'National Geographic Map', 'Ocean Basemap' and more.
Is there any alternate solution ? Please let me know.

Sign in to comment.




Community Treasure Hunt

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

Start Hunting!