%% Reset Geographic Player
% Load a sequence of latitude and longitude coordinates.

data = load('geoRoute.mat');

% Create a geographic player with a zoom level of 12. Configure the geographic player to display all points in its history.

player = geoplayer(data.latitude(1),data.longitude(1),12,'HistoryDepth',Inf);

% Display the full route.

plotRoute(player,data.latitude,data.longitude);

% Display the coordinates in a sequence. The circle marker indicates the current position. At the 200th point, reset the geographic player. Observe that the route and all previously plotted points are removed.

for i = 1:length(data.latitude)
    plotPosition(player,data.latitude(i),data.longitude(i));
   
    if i == 200
        reset(player)
    end
    
    pause(.05)
end

% Copyright 2012 The MathWorks, Inc.