Main Content

reset

Remove all existing plots from geoplayer figure

Description

example

reset(player) removes all previously plotted points and routes from the geoplayer figure.

Examples

collapse all

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

Input Arguments

collapse all

Streaming geographic player, specified as a geoplayer object.1

Version History

Introduced in R2018a


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®.