Before we can visualize the data on the map, we need to prepare the data. The first thing we will do is create a new model that we can use for the prepared data. Let's set this up:
- In the Models folder in the MeTracker project, create a new class called Point.
- Add properties for Location, Count, and Heat, as shown in the following code:
namespace MeTracker.Models
{
public class Point
{
public Location Location { get; set; }
public int Count { get; set; } = 1;
public Xamarin.Forms.Color Heat { get; set; }
}
}
MainViewModel will store the locations that we will find later on. Let's add a property for storing the Points:
- In the MeTracker project, open the MainViewModel class.
- Add a private field called points, which is of the List<Point> type.
- Create a property called Points, which is of the List<Point> type.
- In the&...