Preparing the data for visualization

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 by going through the following steps:

  1. In the Models folder in the MeTracker project, create a new class and name it Point.
  2. Add properties for the Location, the Count, and the 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; }    }} 

The MainViewModel will store the locations that we will find later on. Let's add a property for storing the Points by going through the following ...

Get Xamarin.Forms Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.