Mapsolute MapTP CAPI
MapTP C++ Reference Guide

Mapsolute MapTP CAPI

V.5.2.1

The term MapTP CAPI stands for "Map Transfer Protocol C++ Application Programming Interface". It was designed to offer seamless integration of mapping functionality into software applications written in the C++ programming language.

The Java and C++ programming languages have different concepts for organizing classes and for avoiding name clashes. While Java uses the package concept, C++ has namespaces. These terms are used whenever the programming language is important. For general descriptions where the particular programming language is not important and that apply to both Java and C++ the term package is used preferably throughout the documentation.

Mapsolute in turn organizes packages in package sets. A package set defines a class hierarchy of cohesive, possibly interdependent and associated classes. A package set is often also a compilation unit.

The following package sets are defined:

MBase The MBase package set provides basic mechanisms for dealing with GUI, threading, synchronization, messaging, streaming, communication, resource handling and compression. It is used throughout from classes of the API.
MapTP The MapTP package set defines the protocol that is used between MapTP client applications and the MapTP server for compressed and incremental vector data transport. The protocol defines an object model that gives access to maps and map vector data. The object model consists of maps, map layers and map objects, including the map objects' geometry and attributes.

Furthermore, the package set provides sessions that are used for communication, a rendering engine that controls the interaction with maps and the drawing process, and functionality for a persistent map storage. With the persistent map storage any map data that is received through MapTP can be stored persistently on the client's local file system. From there the map data can be used for caching purposes or to enable offline mapping applications.

Maplet The name Maplet stands for mapping application. MapTP mapping applications are based on the Maplet package set. For example, classes of the package provide functionality for the connection management to the MapTP server and control the process of requesting map data from the MapTP server. Moreover the package set defines an interface for painters and provides a concrete painter class that can be used to paint maps according to MapTP's standard map definition scheme.

The Maplet package set further provides a windowing toolkit containing controls for building GUIs. In addition the package set contains the application's resource manager, the main panel of the application and the application frame window.

To avoid name clashes all classes of the MapTP API belong to a namespace, following common practices in modern object oriented software engineering. The following diagram shows the namespaces of the MapTP CAPI:

API_Stack.gif

All namespaces are available to the MapTP application programmer. Note that the Maplet package set (displayed inside the red border) is available to the programmer in source code. The programmer can use it as is, extend it or tailor it as required or desired. The programmer is free to use it without restrictions even for commercial projects. The classes provided are ready to use and for most projects the source code does not need to be changed. However this code can be used as an example on how to program with MapTP.

The table below describes briefly each namespace of the CAPI. The table is categorized by package set. The left column in the table lists the namespaces with a link to the documentation of the namespace. In the right column a brief description of the namespace is provided.

MBase Utilities, emulation of parts of the Java API, platform independence
MBase The MBase package contains several utility classes that let C++ application programmers write applications in a Java programming style. The package provides fundamental classes for handling strings and other primitive types, input and output through data streams and the file system, and utility classes such as collections. In addition, this package provides classes for handling threads and for synchronizing interaction between threads.


MUtil The MUtil package contains several utility classes used for message handling, synchronization and resource management. These classes are used throughout from classes of the API. Application programmers should therefore have an understanding of the basic concepts that are introduced in this namespace.


MAWT The MAWT package contains classes for creating user interfaces and for painting graphics and images. Hereby it emulates parts of the java.awt package for C++ applications.


MNet MNet contains classes for implementing networking applications.

MapTP Session handling, communication protocol, object model, rendering engine and persistence
MClient The MClient package contains a session class for connecting to and communicating with the MapTP server. The session class handles the socket connections and time out behavior for the MapTP client application.

In addition, the MClient package provides classes that are used by the MapTP protocol as a mechanism for exchanging generic data structures with the MapTP server.



MapTP The MapTP package provides functionality that is essential for every MapTP client application. It contains the MapTP protocol for the communication between MapTP client applications and the MapTP server. Furthermore, the MapTP package defines an object model for representing a MapTP map containing map layers and map objects. Each map object has a geometry and generic attributes that can be accessed via iterators. Map data that is retrieved from the MapTP server is automatically stored in the object model.


MapTPRE The MapTP Rendering Engine controls the rendering and paint process of maps. At its core it provides a canvas class that organizes the rendering. Its instances act as containers for maps and custom objects. Animated zooms, jumps and pans are also controlled by the canvas.


MapTPP This package provides the functionality for the persistent map storage. Any map data that is received through MapTP can be persistently stored on the clients' local file system, either for caching purposes or to enable offline mapping applications.

Maplet Application and windowing - Delivered in source code
Maplet Maplet stands for mapping application. MapTP mapping applications are based on functionality of the Maplet package. For example, classes of the package provide functionality for the connection management to the MapTP server and control the process of requesting map data from the MapTP server. Furthermore, the package defines an interface for painters and provides a concrete painter class already, which can be used to paint maps according to MapTP's standard map definition scheme.


MWT The MapTP windowing toolkit (MWT) provides the main panel of the application and common controls for building the GUI of a MapTP mapping application.

The implementation of MWT depends on MAWT.



MApplication This package contains the MApplication class that acts like a resource manager for MapTP mapping applications. For example, it allows to load properties and image libraries. In addition this package contains a class that represents the application frame window. Most MapTP mapping applications need the classes of this package.


MWTMaplet The MWTMaplet package provides the root component of all MWT controls in a mapping application. This component is also used to show the map. In addition, this package contains some basic map controls that offer rich functionality similar to components and that can be useful to a mapping application.

MWTMaplet depends on MApplication, on MWT and on Maplet.

MapTPTM is a registered trademark of Mapsolute GmbH. Java and all Java-based marks are trademarks of Sun Microsystems, Inc. in the United States and other countries. Mapsolute GmbH is independent of Sun Microsystems, Inc. Other company and product names are the property of their respective owners.

Contact Company Newsletter
© 2008 Mapsolute GmbH, - powered by MapTP, Digital map data provided by NAVTEQ
The use of the map data is subject to the User-Terms of Mapsolute.  Privacy Policy