1   Using PTV xLocate Server with Java/Jsp and C#1.1  Overview1.2  Use case samples1.3  Sample 1: Find (validate) an address1.3.1  Jsp Sample1.4  Sample 2: Find the address closest to a given location1.4.1  Jsp Sample1.5  Sample 3: Find points of interest1.5.1  Jsp Sample1.6  Troubleshooting1.7  C# installation
Back to PTV xServer Management Console

Using PTV xLocate Server with Java/Jsp 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 xlocate.properties these samples may not work properly.

Use case samples

Please choose an xLocate sample use case

Sample 1: Find (validate) an address

This sample shows how to find the co-ordinates of a postal address or validate it.

Jsp Sample

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

Sample 2: Find the address closest to a given location

This sample shows how to find the address which is closest to a given location. By default the search is tolerant. If the is more than one address close to the given location, all addresses are returned. They are ordered by distance.

Jsp Sample

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

Sample 3: Find points of interest

This sample shows how to query for points of interest closest to a given postal address.

Jsp Sample

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

Troubleshooting

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

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 samples.

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.