Community of VE/MapPoint Users and Developers
This is a discussion on Pushpins within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi guys, I am trying to integrate mappoint with our application, I was able to locate the addresses that we ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Pushpins I am trying to integrate mappoint with our application, I was able to locate the addresses that we want on mappoint However when i select those pushpins that i have added it seems like i can only find the one that i clicked on. Here is my code If TypeOf g_oApp.ActiveMap.Selection Is Pushpin Then msgbox g_oApp.ActiveMap.Selection.Name End If what i want to know is, if there is a collection which holds all the selected pushpins. Thank you |
| ||||
|
Yes, the collection is a Dataset. This sample my help, here I'm using a Mappoint ActiveX Control named MPC. (By Default it would be named MappointControl1.) Dim objDataSet As MapPointCtl.DataSet Dim objmap As MapPointCtl.Map Dim objRecordset As MapPointCtl.Recordset Set objmap = MPC.ActiveMap For Each objDataSet In objmap.DataSets If InStr(objDataSet.Name, "My Pushpins") Then Set objRecordset = objDataSet.QueryAllRecords 'objDataSet.ZoomTo Do Until objRecordset.EOF objRecordset.Pushpin.Symbol = 20 objRecordset.MoveNext Loop End If Next
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
| ||||
|
This will only change the pushpin if it is highlighted. Dim objDataSet As MapPointCtl.DataSet Dim objmap As MapPointCtl.Map Dim objRecordset As MapPointCtl.Recordset Set objmap = MPC.ActiveMap For Each objDataSet In objmap.DataSets If InStr(objDataSet.Name, "My Pushpins") Then Set objRecordset = objDataSet.QueryAllRecords 'objDataSet.ZoomTo Do Until objRecordset.EOF If objRecordset.Pushpin.Highlight = True Then objRecordset.Pushpin.Symbol = 20 End if objRecordset.MoveNext Loop End If Next
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
![]() |
| Tags |
| pushpins |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Creating a subset of Pushpins from a set of pushpins | paf33 | MapPoint 2006/2009 Discussion | 3 | 08-09-2005 05:54 AM |