%% Plot Multiple Routes
% Plot multiple routes in a geographic player by calling plotRoute multiple times.
% Load data for a route.

data = load('geoRoute.mat');

% Extract data for the first vehicle.

lat1 = data.latitude;
lon1 = data.longitude;

% Create a synthetic route for the second vehicle. Add a small offset for better visibility.

lat2 = lat1 + 0.002; % add a small offset in degrees
lon2 = lon1;

% Create a geoplayer object, specifying the starting coordinates for one of the routes.

player = geoplayer(lat1(1),lon1(1));

% Plot the routes in the geographic player by calling plotRoute for each route.

plotRoute(player,lat1,lon1);
plotRoute(player,lat2,lon2);

% Copyright 2019 The MathWorks, Inc.