State management and pooling capabilities, Mapxtreme web controls and tools – Pitney Bowes MapXtreme User Manual

Page 80

Advertising
background image

Chapter 5: Web Applications, Controls, and Tools

MapXtreme Web Controls and Tools

MapXtreme v7.1

80

Developer Guide

State Management and Pooling Capabilities

One of your goals in building a MapXtreme web application is to make it stable, scalable and offer a
satisfying experience for your users. MapXtreme provides configurations to help you manage the
state of your application, and allow it to grow with the numbers of users.

The MapXtreme web application template and the sample applications are configured to manage
state manually. This means that only the changes your users make during their interaction with your
application are saved and restored. You accomplish this by writing code that is specific to your
application and save/restoration needs.

To more efficiently serve the potentially growing number of users of your application, the template
and sample applications are configured to use the Microsoft COM+ pooling service in which
MapXtreme Session objects are available and shared across multiple requests.

State management and pooling need careful consideration when you are planning your web
application. See

Chapter 6: Understanding State Management

.

MapXtreme Web Controls and Tools

MapXtreme’s web controls and tools are embedded in a web page. Web controls respond to
interactions by web tools. Information that is captured using a tool is processed on the server by the
web page and returned to the client, typically as a new map image.

MapXtreme provides three web controls (MapControl, LayerControl, and LegendControl) and a
number of map tools. The web controls show content, such as a map, a list of map and label layers
and their properties, or a legend to identify what the layers represent. The tools interact with the
MapControl to change the view of the map, select features on the map for further analysis, and
more. For a description of the web controls and tools see

Description of Web Controls and Tools

.

The Web controls and tools are available from several places within Visual Studio:

Visual Studio toolbox under the MapXtreme heading. Drag and drop these controls onto your
Web Form to add mapping functionality to your project.

Web Application template: Start with the MapXtreme web application template (Visual Studio
File > New Project menu) to build a mapping prototype that requires no coding.

Sample Applications: Task-oriented samples are located In the \Samples\Visual Studio
20xx\Web\Features folder. Source code is also provided for you to learn from or extend for your
own needs.

The API for Web controls and tools is contained in the MapInfo.WebControls namespace. See the
Developer Reference for more information.

JavaScript-Enabled for Partial-Page Updates

MapXtreme web controls and tools use a combination of a web page and JavaScript to tell the
MapXtreme server what needs to be done. Each map tool specifies a JavaScript ClientInteraction
that defines what must happen (for example, click, draw a rectangle, line, or polygon) and a
JavaScript ClientCommand that sends a URL request to the server to process the command (for
example, pan, zoom, or select an object).

Advertising