Load a sequence of latitude and longitude coordinates.
data = load('geoRoute.mat');
Create a geographic player with a zoom level of 12. Configure the player to display all points in its history.
player = geoplayer(data.latitude(1),data.longitude(1),12,'HistoryDepth',Inf);
Display the geographic coordinates in a sequence by using the plotPosition function. Put the call to plotPosition inside a while loop, so that the player plots points only while the figure is open. You can exit the loop by closing the figure. If you do not close the figure, then the loop automatically exits when all points are plotted.
i = 1;
numPoints = length(data.latitude);
while isOpen(player) && i<=numPoints
plotPosition(player,data.latitude(i),data.longitude(i))
pause(0.1)
i=i+1;
end
To make the figure visible again, use the show function.
[1] Alignment of boundaries and region labels are a presentation of the feature provided by the
data vendors and do not imply endorsement by MathWorks®.
예제 열기
이 예제의 수정된 버전이 있습니다. 사용자가 편집한 내용을 반영하여 이 예제를 여시겠습니까?
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.