Top |
Post New Question |
Read All |
MP2K Asks Microsoft
814
Sean
-
August 1, 2002
I have a VB6 app using LINKDATA to get to a Access database. I am able to read the lat/long in and display the one type of pushpin(symbol) for each individual point. My question..... Is it possible to have a unique symbol ID (pushpin) for each point on the map (i.e. - one location use a red truck and the other blue )? Thank you again.....
Answer:
August 2, 2002
You could set the "Symbol" as you create the pushpins or use this code to change them if they are already on the map.
Dim objDataSet As MapPointCtl.DataSet
Dim objRecordset As MapPointCtl.Recordset
Dim cnt As Integer
cnt = 0
Set objDataSet = MappointControl1.ActiveMap.DataSets(1) '("My Pushpins")
Set objRecordset = objDataSet.QueryAllRecords
objRecordset.MoveFirst
Do Until objRecordset.EOF
cnt = cnt + 1
If cnt = 255 Then cnt = 0
objRecordset.Pushpin.Symbol = cnt
'or use a select statment
Select Case objRecordset.Pushpin.Name
Case "Test1"
objRecordset.Pushpin.Symbol = 57
Case "Test2"
objRecordset.Pushpin.Symbol = 41
End Select
objRecordset.MoveNext
Loop
John
john@support-pc.com
Post New Answer / Follow-up