Community of VE/MapPoint Users and Developers
This is a discussion on Remolve all pushpins within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi. I'm using a MapPoint control inserted in a VB 6 form. Is there a way to remove all pushpins ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Remolve all pushpins I'm using a MapPoint control inserted in a VB 6 form. Is there a way to remove all pushpins in the map without "FindPushpin" all of them? Sometimes, I want to clear the map, I know there must be some pushpins, but I don't know their names. So I would need something like "map.RemoveAllPushpins()". Thanks in advance. |
| |||
|
I think it is not possible, I am looking for just the same thing. But as I looked on many forums, I did not find anything about it, except this: replace the pushpins by "empty" icon's.. And that's what I did, it's not the most clean solution, but it works... |
| ||||
|
Here is a sample to delete all pushpins Code: Dim objmap As MapPointCtl.Map
Dim objdataset As MapPointCtl.DataSet
Dim objRecordset As MapPointCtl.Recordset
Set objmap = Form1.MappointControl1.ActiveMap
For Each objdataset In objmap.DataSets
Set objRecordset = objdataset.QueryAllRecords
Do Until objRecordset.EOF
objRecordset.Pushpin.Delete
objRecordset.MoveNext
Loop
Next
Code: Form1.MappointControl1.ActiveMap.Saved = True Form1.MappointControl1.NewMap (geoMapNorthAmerica)
__________________ John http://www.support-pc.com Order MapPoint 2006 Here https://secure.mp2kmag.com/?refer=support-PC |
| |||
|
I think this is what you are looking for: (Delphi) var ONE: OleVariant; myMap: TMap; begin ONE:=1; ... myMap.DataSets[ONE].Delete; This deletes all pushpins the myPushpins dataset. When you add a new pushpin the map, the MyPushpins dataset is recreated. It works as long as you don't have other datasets on your map though. If this is not the case, you would need to look for the proper dataset (myPushpins) first. Hope it helps. Pascal |
![]() |
| Tags |
| pushpins, remolve |
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 |