This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

reset

Remove all existing plots from geoplayer figure

Syntax

reset(player)

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.

Introduced in R2018a