Click or drag to resize

Using the API - Quick Start Guide

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Overview

This article outlines a few important steps to get you developing quickly with the GeoBase API and Visual Studio.

Setting up Visual Studio

For every new GeoBase/Visual Studio project, ensure that:

  • the correct .NET Target Framework has been selected

  • your project references geobase.net.dll

  • GeoBase data files (*.gbfs) are available to the application

Choosing the .NET Target Framework

If you are developing a GeoBase desktop or GeoStream application, you can use any .NET Target Framework from 4.0 onwards.

If you are using Visual Studio 2010 for developing a GeoBase application, you will need to change the Target Framework. By default, Visual Studio 2010 sets the .NET Target Framework as .NET Framework 4 Client Profile. When running under .NET 4, GeoBase requires the .NET Framework 4 Full Profile rather than the .NET Framework 4 Client Profile.

To change the framework profile, right-click on your project name in the Solution Explorer, and select Properties from the context menu. From the Application tab, select the Target Framework drop-down menu, and select .NET Framework 4, as shown below.

dotnet Profile

Referencing geobase.net.dll

For each project you should add a reference to geobase.net.dll, which will allow you to harness GeoBase’s functionality, as well as provide IntelliSense within Visual Studio.

To add the reference, right-click the References folder in the Solution Explorer and select Add Reference. You will be prompted to select a component. Click the Browse tab and navigate to C:\Program Files\Telogis\GeoBase\bin. Select geobase.net.dll and click OK.

GeoBase Data Files

GeoBase relies on data files for its mapping functionality. These files have a gbfs extension and can either be loaded automatically, or you can instruct your GeoBase application to load them from a specified location.

For more information on which files are required, where they are located, and how GeoBase searches for them, see the Data Files Concept topic.

Hints & Tips

Use Telogis.GeoBase namespace directives

To make the code simpler and more readable, add the following using directives to the top of the project form:

C#
using Telogis.GeoBase;
using Telogis.GeoBase.Routing;
using Telogis.GeoBase.Navigation;

GeoBase and SQL Server

GeoBase can be integrated with SQL Server. However, doing so requires additional support files specific to each SQL Server version. Please e-mail gbsupport@verizonconnect.com for details if you would like to use this feature.

Code Signing

GeoBase assemblies use code signing to confirm the software's authors and to verify that its code has not been altered or corrupted. When a .NET application using GeoBase is started, it will attempt to validate its signing certificates with the issuing authority. This process will result in TCP transmission on application start-up.

Under normal circumstances this certificate validation process will complete in moments. However, if an Internet connection is present but for any reason the issuer cannot be be contacted (as a result of network failure, for example) the .NET application will wait until its default timeout period of 15 seconds has passed before using its cached authorization data. This may result in an application appearing to 'freeze' for 15 seconds on start-up. This situation does not arise if there is no Internet connection present; for example on an offline machine.

This issue is inherent to .NET code signing and API level changes cannot be made to circumvent it. However, if this is an issue for your application, it is possible to turn off this behavior on a per-application basis.

To do so, add an Application Configuration file to your Visual Studio project as follows:

  • Right click on the project in the Solution Explorer, select Add Item, then choose Application Configuration File from the list that appears. This will create a file called App.config within your solution.

  • Open App.config and add the following XML to the <configuration> block:

XML
<runtime> 
   <generatePublisherEvidence enabled="false"/> 
</runtime>
  • Save the file and rebuild your application. Your application will no longer attempt to communicate with the assigning authority.

Note Note

This process will work under .NET 4.0 or higher.

Contact Information

GeoBase uses the class ContactInfo when specifying contact details in error messages within your application. By default, the class contains contact details for Verizon Connect. To change the contact details to match your organization, add the following line into your application (replacing the contact details with your own):

C#
ContactInfo myInfo = new ContactInfo("Acme Inc.", "support@acme.com", "http://www.acme.com", "555-ACME-HELP");

Where ContactInfo has the parameters company (company name), email (email address), url (URL of the support website), and phone (phone number).

FAQs

The GeoZone site hosts a FAQ page dealing with questions regarding the GeoBase API, including installation, technical concepts, tools (such as Alchemy), licensing and GeoStream. Follow the links for the GeoZone home page, and the GeoZone FAQ page.

Examples

There are numerous tutorials and example code, covering GeoBase concepts and namespaces, available in both this help and the GeoZone site.