How to connect PTV xServer.NET with PTV Developer?
Posted: Mon Sep 26, 2022 9:22 am
HI there,
recently I've been asked by partners about how to access PTV Developer raster maps through the well known PTV xServer.NET control. Sensei Oliver created a sample project for you: https://github.com/oliverheilig/PtvDeveloperForms
Most obvious difference between "xMap" and "Developer" is the usage via a RemoteTiledProvider:
(Source taken from Form1.cs)
Best regards,
Bernd
recently I've been asked by partners about how to access PTV Developer raster maps through the well known PTV xServer.NET control. Sensei Oliver created a sample project for you: https://github.com/oliverheilig/PtvDeveloperForms
Most obvious difference between "xMap" and "Developer" is the usage via a RemoteTiledProvider:
Code: Select all
new TiledLayer("Raster")
{
TiledProvider = new RemoteTiledProvider
{
MinZoom = 0,
MaxZoom = 22,
RequestBuilderDelegate = (x, y, z) =>
$"https://api.myptv.com/rastermaps/v1/image-tiles/{z}/{x}/{y}?style=silica&apiKey={apiKey}",
},
IsBaseMapLayer = true,
Copyright = "© 2022 PTV Group, HERE",
Caption = MapLocalizer.GetString(MapStringId.Background),
Icon = ResourceHelper.LoadBitmapFromResource("Ptv.XServer.Controls.Map;component/Resources/Background.png")
}
Best regards,
Bernd