Labels – Pitney Bowes MapXtreme User Manual

Page 246

Advertising
background image

Chapter 12: Adding Mapping Capability to Your Applications

Labels

MapXtreme v7.1

253

Developer Guide

ftr2.Item("Level") = 2
tblTemp.InsertFeature(ftr2)
End Sub

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Dim cat As Catalog = MapInfo.Engine.Session.Current.Catalog
Dim tbl As Table = cat.GetTable("Animation")
If IsNothing(tbl) = False Then
'Update the position of the points
Dim si As SearchInfo = MapInfo.Data.SearchInfoFactory.SearchWhere("Name= _

'Kelly'")

Dim ftr As Feature = cat.SearchForFeature(tbl, si)
Dim si2 As SearchInfo =_

MapInfo.Data.SearchInfoFactory.SearchWhere("Name = 'Greg'")

Dim ftr2 As Feature = cat.SearchForFeature(tbl, si2)

If TimeOfDay.Now.Second Mod 4 = 0 Then
ftr.Geometry.GetGeometryEditor().OffsetByXY(-5, -25, DistanceUnit.Mile, _
DistanceType.Spherical)
ftr2.Geometry.GetGeometryEditor().OffsetByXY(0, 25, DistanceUnit.Mile, _
DistanceType.Spherical)
Else
ftr.Geometry.GetGeometryEditor().OffsetByXY(-10, 0, DistanceUnit.Mile, _
DistanceType.Spherical)
ftr2.Geometry.GetGeometryEditor().OffsetByXY(10, 5, DistanceUnit.Mile, _
DistanceType.Spherical)
End If
ftr.Geometry.EditingComplete()
ftr2.Geometry.EditingComplete()
ftr.Update()
ftr2.Update()

End If

End Sub

Labels

The following section discusses the Labels objects and classes. The diagram below is a UML
representation of the Labels hierarchy.

Advertising