Pitney Bowes MapXtreme User Manual

Page 181

Advertising
background image

Chapter 8: Working with Data

Table Metadata (TableInfo)

MapXtreme v7.1

188

Developer Guide

For more information and code examples, see the MapInfo.Data.SpatialSchemaPointRef class in
the Developer Reference Help system.

VB example:

Public Shared Sub MapInfo_Data_SpatialSchemaPointRef(ByVal _

map As _Map)

' a non-mappable table

Dim ti As TableInfo = _

TableInfo.CreateFromFile("c:\data\customers.TAB")

Dim pr As SpatialSchemaPointRef = New SpatialSchemaPointRef

pr.CoordSys = map.GetDisplayCoordSys()
pr.StyleType = StyleType.None
pr.RefTable = "us_zips"

' the column in RefTable which will match the MatchColumn in my data

pr.RefColumn = "zipcode"

' a column in the Customer table

pr.MatchColumn = "zip"
pr.RefTableLocation = "c:\data\us_zips.tab"

' Now set the spatial schema information before opening the table.

ti.SpatialSchema = pr
Dim table As Table = Session.Current.Catalog.OpenTable(ti)

End Sub

Advertising