Comparing mapxtreme’s object model to mapx, Specific object model implementation differences – Pitney Bowes MapXtreme User Manual

Page 597

Advertising
background image

Appendix J: Migrating to MapXtreme

Comparing MapXtreme’s Object Model to MapX

MapXtreme v7.1

604

Developer Guide

Comparing MapXtreme’s Object Model to MapX

If you have used MapX and MapXtreme for Windows, you will find similarities and differences in the
way they work from MapXtreme. This section describes some of the major differences between
MapXtreme and previous versions of our APIs.

Specific Object Model Implementation Differences

The Map object from MapX is now represented by 3 or 4 classes. The Map contains the layers, area
of interest (view), Adornments, Legends, regardless of how it is being viewed. The MapControl holds
the Map object and acts as a control for the Map and tools which interact with the Map. There is a
MapControl for both Windows Forms (desktop) applications and ASP.NET (web) applications. The
MapExport class can be used to export a Map to a file or stream. The Session holds the collection of
Maps, Selections, and Tables. Cartographic scale is now fully supported. Label layers can be used
to better control the position of labels. Group Layers allow for treating many layers as one in the
layer hierarchy.

The MapX Datasets concept has been replaced by a more flexible set of options in the MapInfo.Data
namespace. MapXtreme uses ADO.NET for data access. ADO.NET allows a wide variety of data
formats to be accessed with very similar code, facilitating easy transition between data sources. We
have added a wider variety of cursors for forward and backward access through a database table.

MapXtreme uses a table-centric data model. In previous versions of our API, maps were made up of
layers, but there was no specific table class. In the MapXtreme object model, a table is the central
object used for accessing data. The Session.Catalog is used to open and enumerate tables. Layers
can reference tables, but all table specific methods were moved from Layer to table. Also, Searching
is done on tables in MapXtreme and not layers.

Thematics that modify styles, such as ranged themes and individual value themes, no longer use
their own layer. In the previous models such a theme occupied a separate layer and worked
independently of other layers of a map. Object themes still retain their own layer and can now be
displayed in any way you choose, independent of the original map objects on which the theme was
based.

Geometry has been changed to be a hierarchical model with much deeper access to properties of
the objects. Styles are also represented in a hierarchy.

A larger quantity of map tools have been added for you to use. Their extensibility and functionality
has been enhanced to make it much easier to develop customized tools. There are also tools for use
in web applications that are also extensible.

For web applications, the MapXBroker and MapXServer are no longer needed. Instead MapXtreme
uses standard COM+ to pool the Session object.

Application state is managed via serialization and the ASP.NET state server. See

Chapter 6:

Understanding State Management

for more details about state management and serialization.

The following table lists the objects in the MapX 5.0 object model and the equivalent in the current
object model for MapXtreme. Note that with the re-architecture of such an extensive product as
MapXtreme, the equivalent may approximate.

Advertising