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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.