Adding an infotool to a web application, Asp.net ajax and mapxtreme web applications, Asp.net ajax – Pitney Bowes MapXtreme User Manual
Page 92: And mapxtreme web applications, Adding an, Infotool to a web application

Chapter 5: Web Applications, Controls, and Tools
Adding an InfoTool to a Web Application
MapXtreme v7.1
92
Developer Guide
Adding an InfoTool to a Web Application
MapXtreme provides a sample application for an InfoTool that can be adapted and used in a web
application. Use this tool to capture information at the point a user clicks on the map and get
information returned from the web application.
Follow these steps to modify the InfoTool sample.
1. Locate the InfoToolCS or InfoToolVB Web Application in the samples folder (default location
C:\Program
Files\MapInfo\MapXtreme\7.x.x\Samples\VisualStudio20xx\Web\Features\InfoTool\InfoToolVB.
2. Copy the following files to your project folder and add them to your project:
•
CustomCommand.js from the root of the InfoTool folder
•
CustomizedCommands.cs or CustomizedCommands.vb from the \App_Code folder
•
stylesheet.css from the root of the InfoTool folder.
3. Add a PointSelect tool to your Web Form and add the code below in the form’s Page_Load
method:
MapInfo.WebControls.MapControlModel controlModel =
MapControlModel.SetDefaultModelInSession();
controlModel.Commands.Add(new CustomWebTools.Info());
4. Match the properties of the PointSelect tool to those of the InfoTool from the sample application.
Set these in the tool’s Properties window.
These properties include: ClientCommand, ClientInteraction, Command, CursorImageURL,
InactiveImageURL. and MapControlID.
5. Switch the form to the HTML view and add the following line after the