Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
204 lines (122 sloc) 8.65 KB

A collection of samples and demos for PTV xServer .NET.



For xServer internet an additional authentication is needed compared to an on-premise solution. This authentication consists of a common user/password pair which has to be set at the corresponding property of the Map control. A special user xtok exists which can be used for unregistered clients. The corresponding password, called xToken, can be obtained to grant full access of xServer functionality.

Due to this full access the xToken cannot be provided in the source code. Instead, place holders are used. They are replaced when the build process is started by a tool called Insert-XS.Net-Token.exe. When this tool finds an appropriate place holder, it shows a dialog to insert the xToken.

To access multiple sample projects without any tedious repetition of xToken insertion, Insert-XS.Net-Token.exe can be used to substitute the place holders in all projects. This tool is located in libs subfolder of the base directory. Via command line add the following parameters:

Insert-XS.Net-Token.exe -path "base directory of project"

The samples

Xmap2LayerFactoryTest #new #xserver-2

Demonstrates the API for native Xmap2/FeatureLayer support.

DemoCenter #new #xserver-1

Source code for xServer.NET demo center.

SharpMap.Widgets #new #interop #sharpmap #shapefile #javascript #leaflet

Build responsive map applications for web and desktop

leaflet-vb6 #new #interop #vb6 #javascript #leaflet

Embed leaflet-based maps within classic desktop applications

ActiveX #interop

Shows how to use the map as ActiveX control

BasemapTooltips #xserver-1

Shows how to display city/street information as tool tip by reverse locating

Circles #custom-data

Shows how to render circles with a geographic radius

CustomBgProfiles #xserver-1

Shows how to switch the basemap profile

CustomInit #customize

Shows how to explicitly initialize the xMapServer base map

CustomLayout #customize

Shows how to set-up a map-layout with custom gadgets

CustomLocalizer #customize

Shows how to use your own string resources to localize the texts of the control.

CustomPanAndZoom #customize

Shows how to change the default behavior for pan/zoom interaction.

DrawMode #customize

The basic code to add an interactor for drawing custom polygons

DragAndDrop #customize

Shows how to implement drag&drop for elements on the map.

ExtensibilityTest #customize

Tests for customization and extensions of the map control

FeatureLayers #xserver-1

Shows how to render Feature Layers on the control

FormsMapCS #hello-world

Shows how to add the map to a Windows Forms application in C#

FormsMapVB #hello-world

Shows how to add the map to a Windows Forms application in VB.NET

Mandelbrot #customize

Shows how to implement a client-side tile provider and demonstrates the "Infinite Zoom" feature

ManySymbols #customize

Shows practices to display many symbols with the ShapeLayer

ManySymbols2 #customize

Shows how to display even more symbols by implementing a custom layer

MapArrowDemo #customize

Shows how to build custom shapes for the shape layer

MFCMapDialog #\interop

Shows how to add the map to an MFC application

MultipleContainers #customize

Test for map controls in multiple tab-, split, and dock-containers

MemAssertDemo #testing

A utility class + demo that helps to track-down memory-leaks in your code.

MemoryPressureTest #testing

Tips to optimize xServer.NET for limited-memory scenarios

PieChartsAndExport #user-data

Shows how to render arbitrary WPF elements and print/export the map content

Providers #interop #3rd-party

Shows how to add 3rd-party basemap tiles

RoutingVB #interop

Shows how to add drag&drop routing to a Visual Basic project.

SelectionDemo #customize

Shows how to render custom icons and select them by dragging a rubber band

ServerSideRendering #xserver-1

Shows how to render additional xMap layers with tooltip interaction

SimpleWms #3rd-party

Shows how to add simple WMS (with "Google" EPSG:3857) layers to the control

SymbolsAndLabels #customize

Shows how to draw symbols with an attached label tag

TourPlanningDemo #xserver-1

Shows practices how to use the new xTour 1.18 job api @xServer internet

ToursAndStopsMultiCanvas #customize

Shows how to build one logical layer containing different canvases rendered before and after the xMap labels

VdiPerformance #testing

Benchmark for different settings that influence performance on Virtual Desktop Environments (VDI)VdiPerformance

WMTSLayer #new #wms #xserver-2 #3rd-party

Demonstrates the integration and initialization of a layer showing Web Map Tile Service (WMTS) content.

XYNSegments #xserver-1

Shows how to select and render xServer XYN-Segments

You can’t perform that action at this time.