I'm coming today to speak about the Tiles of the map !
For a personnal project and the project of my company, I need to customize a lot my Xamarin.Forms.Maps. I found this tutorial Custom Map Tiles in Xamarin.Forms which speak only about Android and iOS (one more time..) However, I would love to know how does it works for WinPhone 8.1 and/or UWP.
Also, Because it uses Mapbox, I would like to know if this project is really make to be available for a long time? (I ask only for those who knows something about this project, because I don't know juste by reading).
As I know, some nuget package about it exists but without making what I really want (I want to custom the tiles over each plateform)
If you have a website about it or if you already did it, can you give me some directions or any help please? Thank !
EDIT 1
I found this code for the UWP renderer, but it doesn't change the map tiles..
[assembly: ExportRenderer(typeof(CustomMap), typeof(CustomMapRenderer))]
namespace MapTileProject.UWP.Renderer
{
public class CustomMapRenderer : MapRenderer
{
CustomMap customMap;
MapControl mapControl;
protected override void OnElementChanged(ElementChangedEventArgs<Map> e)
{
base.OnElementChanged(e);
if (e.NewElement != null)
{
customMap = e.NewElement as CustomMap;
mapControl = Control as MapControl;
UpdateTiles();
}
}
private void UpdateTiles()
{
Debug.WriteLine("BEGINING !");
HttpMapTileDataSource dataSource = new HttpMapTileDataSource(customMap.MapTileTemplate);
MapTileSource tileSource = new MapTileSource(dataSource);
mapControl.TileSources.Add(tileSource);
Debug.WriteLine("END !");
}
}
}