Back to PTV xServer Management Console

PTV xMap Server Code Samples

Using PTV xMap Server with Jsp/Java and C#

Overview

If you have accessed this page through the xServer's management console, you can immediately view and execute the Jsp code samples, just click the links below. Refer to the troubleshooting section if the samples do not work. This page is best viewed with Mozilla Firefox.

In order to install the C# samples which are not displayed here by default, refer to the C# installation section.

These samples are designed to be executed with the default data of Luxemburg. If you changed the data path in xmap.properties these samples may not work properly.

Use case samples

Please choose an xMap sample use case

Sample 1: Simple map request using bounding box

This sample shows how to request a map by using the map's bounding box.

Jsp Sample

View the source by clicking 'show/hide source' below, or execute it by clicking execute.
Back to Top

Sample 2: Simple map request using map center and scale

This sample shows how to request a map by using the map's center co-ordinates and the scale.

Jsp Sample

View the source by clicking 'show/hide source' below, or execute it by clicking execute.
Back to Top

Troubleshooting

If the Jsp samples cannot be executed, please view the source code and check the serviceUrl variable.


Back to Top

C# installation

The C# samples can be found in the xServer's samples folder. Please unpack them into the root folder of your local IIS installation, usually C:\Inetpub\wwwroot. Then call the IIS management console from the Control Panel and register the sample folder as IIS application.

Additionally make sure, that Microsoft.Net Framework 2.0 redistributables are installed and ASP.NET is registered within Internet Information Services (IIS). For registration use the ASP.NET IIS Registration tool with the command line

aspnet_regiis.exe -i

After having executed these steps, please reload this page. The C# samples are automatically displayed and can be executed.

Please note: If your IIS installation directory is not C:\Inetpub\wwwroot, then edit this page and change the value of the IISPath variable. If the IIS url is not http://localhost then change the value if the IISUrl variable.