To show the heat map on our map, we will create a new control. We will use a custom renderer to do this. Follow these steps:
- In the MeTracker project, create a new folder called Controls.
- Create a new class called CustomMap.
- Add Xamarin.Forms.Maps.Map as a base class to the new class, as shown in the following code:
using System.Collections.Generic;
using Xamarin.Forms;
using Xamarin.Forms.Maps;
namespace MeTracker.Controls
{
public class CustomMap : Map
{
}
}
If we want to have properties that we want to bind data to, we need to create a BindableProperty. This should be a public static field in the class. We also need to create a regular property. The naming of the properties is really important. The name of BindableProperty needs to be {NameOfTheProperty}Property; for example, the name of BindableProperty that we will create in the following steps will be PointsProperty because the name of the property is Points. A BindableProperty...