spacer1
spacer2 1_1 1_2
2_1
 Subscribe
 The MP2K Update!
 
 
 
 Magazine
Front Cover
What's New
Articles
News
Sample Data
Gallery
Advertise
About
 Features
MapPoint 2013
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 Earlier Content
Past News Items
Past What's New Announcements
 Sponsors
 Order

MapPoint 2013

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
SVG Tutorials
MapPoint

Map Visitors

  MAPPOINT Q & A  

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


Google
 
MP2Kmag Internet


 Recent Discussion
 Resources


Want Your Site To Appear Here?

   © 1999-2012 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009/2010/2011/2013 are either trademarks or registered trademarks of Microsoft.