MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Remolve all pushpins

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-11-2003
Junior Member
White Belt
 
Join Date: Mar 2003
Posts: 5
Remolve all pushpins

Hi.
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2003
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,480
Blog Entries: 1
With the legend open, you should be able to select and delete whole Pushpin sets.
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 04-11-2003
Junior Member
White Belt
 
Join Date: Mar 2003
Posts: 5
Thanks for the answer, but I forgot to mention that I want to delete the from VB code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-11-2003
Junior Member
Yellow Belt
 
Join Date: Mar 2003
Posts: 18
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 04-12-2003
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
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
another option is to open a new map without saving the current.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 04-29-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
pushpins, remolve


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 11:00 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54