Pitney Bowes MapXtreme User Manual

Page 190

Advertising
background image

Chapter 8: Working with Data

Features and Feature Collections

MapXtreme v7.1

197

Developer Guide

MapXtreme ships with a Search sample application that you can run and learn more about each
search type. The illustration below shows the Search menu with the SearchInfoFactory methods that
use a spatial reference. The Map Search menu has methods for searching based on a drawn screen
geometry object (circle or rectangle). The Query Definition menu highlights the use of various filters
that act on an SQL statement. Find the sample in the
..\MapInfo\MapXtreme\7.x.x\Samples\Desktop\Features\Search folder.

Code Samples

This section includes several code samples that pertain to SearchInfoFactory methods.

SearchNearest

Using the SearchNearest method, the code simulates the Select Point tool behavior to select the
topmost items under a mouse click and add them to the selection.

VB example:

Public Shared Sub MapInfo_Mapping_SearchInfoFactory(ByVal _

mapControl1 As MapControl)

' Get a point from mouse click. Hard coded value use in sample.

Dim pt As System.Drawing.Point = New System.Drawing.Point(100, 100)

' Assumes there is a MapControl with a map in it.

SearchIntersectsGeometry

Returns the rows where the table geometry intersects with the
search geometry.

SearchWithinScreenRadius Creates a SearchInfo that returns the rows where the table

geometry intersects a screen circle.

SearchWithinScreenRect

Returns the rows where the table geometry intersects the given
screen rectangle.

SearchInfoFactory

Methods

Behavior

Advertising