View Single Post

  #1 (permalink)  
Old 11-19-2004
flymoe flymoe is offline
Junior Member
White Belt
 
Join Date: Oct 2004
Posts: 3
Where are my Push Pins! Help!

After struggling to find how to programmatically control mappoint in VB6 I at last managed to set up a data link that I can refresh from code e.g. Timer etc.

All seems to work exactly as I need it but, it links the data and displays the map but does not display the push pins! If I run the Wizard to link the data the push pins are shown. However, although my code lets me show the map and update the link and import the push pin set perfectly, it does not display the push pins on the map.

As I am very new to this I expect as usual I am missing the point somewhere. What am I doing wrong? Any help on this one would be gratefully received. Things are now getting very frustrating!

Enclosed a sample of the code I used.

Flymoe

Public objApp As New MapPoint.Application
Public szconn As String
Public oDS As MapPoint.DataSet
Public objPin As MapPoint.Pushpin
Public objField As MapPoint.Field

Sub MyMap()


objApp.Visible = True
objApp.UserControl = True

With objApp.OpenMap("C:\testmap.ptm", True).DataSets
szconn = "C:\maps\tables.mdb!areas2"
Set oDS = .LinkData(szconn, "Position", , geoCountryUnitedKingdom, , geoImportAccessTable)
oDS.DisplayPushpinMap
oDS.Symbol = 1

End With

End Sub
Reply With Quote