Build Your Custom Styleable Map Markers

Custom Markers

The result is an object which can be dynamically scaled and colored.

PTV xServer .NET comes with a bunch of predefined symbols which are styleable.

Styleable means that you can set the color and size at runtime. This is very useful to create thematic maps.

The following tutorial shows how to create your own styleable map elements and use it in the map.


If you need further information or support please contact the Support Team.

Advanced Line Styling to visualize the direction of Routes and Tours

We were asked how to indicate the direction for a route or a tour using the shape layer. We’ve built a sample for it which demonstrates two options:

1. Use a stroked MapPolyline and animate the StrokeDashOffset property. This technique is also used at the RoutingDemo of the demo center application.
2. Implement a custom MapShape which renders little arrows along the polyline. This technique is a little bit more complex, because you have to calculate the arrow coordinates by yourself. I’ve implemented an ArrowDashLine class which handles this.
AdvancedLineStyles Download application, x-zip-compressed::

To indicate the directions of transports, you can also take a look at MapArrowDemo explained here.

For any questions please contact the PTV xServer Support Team.

How to implement custom MapShapes

A sample which shows how to implement a custom shape type using the example of arrows between locations. We’ve adopted Charles Petzold’s WPF arrow sample  to work with geographic coordinates.


Download application, x-zip-compressed:

For any questions please contact the PTV xServer Support Team.

Use your own xMap Rendering Styles with PTV xServer .NET

  • Create your own rendering configuration (e.g. myRender.ini). You find the description of the format in the PTV xMap Server documenation
  • Copy the and rename it (e.g.
  • Change the entry for the rendering profile in this file, (e.g. map.profile=myRender.ini)
  • In PTV xServer .NET right after initialization of the map you can set this profile as custom profile
((map.Layers["Background"] as TiledLayer).TiledProvider as 
XMapTiledProvider).CustomProfile = "ajax-bg-myprofile";

Currently you can set the custom configuration only once right after the initialization but you cannot change it afterwards because the profile name has to be considered for the tile cache then. We’ll change this behavior for the next release, so you can change the profiles at runtime like in the sample we provide here.



Download :

For any questions please contact the PTV xServer Support Team.


Multi-touch gestures for PTV xServer .NET

One of our collegues attended at Microsoft Build Developer Conference and came home with an Acer Iconia W3 and a Surface Pro tablet. So we could test PTV xServer .NET with multi-touch on Windows 8. We’ve added a pinch-zoom function, so multi-touch will be fully supported in the next version.



Ways to integrate a touch-friendly PTV xServer map for the Windows 8 UI


This gallery contains 4 photos.

The “Windows 8 Modern UI” (formerly known as “Metro”) defines a new programming model for apps which supports tablets and other touch devices.

Accessing xServers from these apps is simple: Just use SOAP with C#/VB or the new JSON API (see blog post of September 2012) with JavaScript to access the xServer functions directly from a Windows 8 app.… Read more