MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Delete previous pushpins

This is a discussion on Delete previous pushpins within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I cant able to resolve the problem of deleting previous pushpin and get mine visible pushpin only. I tried ...


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 (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 04-15-2008
Member
Yellow Belt
 
Join Date: Mar 2008
Posts: 37
Delete previous pushpins

Hi,
I cant able to resolve the problem of deleting previous pushpin and get mine visible pushpin only. I tried for deleting PP dataset and then add new one but not able to get control on program. ....please let me help to come out of this problem. Any one who knows C#....
Code:
object o = "Pushpins";
               Pushpin a =null;
               a= axMappointControl1.ActiveMap.AddPushpin(loc, "hi");
                try
                {
                   
//MapPoint.DataSet Pushpins = axMappointControl1.ActiveMap.DataSets.get_Item(ref o);
MapPoint.Recordset rs = axMappointControl1.ActiveMap.DataSets.get_Item(ref o).QueryAllRecords();
MapPoint.DataSet pushpin = axMappointControl1.ActiveMap.DataSets.AddPushpinSet("new");
a.Delete();
                    rs.MoveFirst();
                    while (!rs.EOF)
                    {
                        axMappointControl1.ActiveMap.DataSets.ZoomTo();                        
                        rs.Pushpin.MoveTo(pushpin);
                        rs.MoveNext();
                    }

                }
                catch {  }
            }
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-16-2008
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Re: Delete previous pushpins

Hi,

This delete all your pushpins:

Code:
object o = "My Pushpins";
try {
   MapPoint.DataSet ds = MP.ActiveMap.DataSets.get_Item(ref o);
   ds.Delete();
catch {
   // Dataset does not exists
}
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-16-2008
Member
Yellow Belt
 
Join Date: Mar 2008
Posts: 37
Re: Delete previous pushpins

Thanks. Mine code is deleting previous Pushpin but I want mainting mine current pushpin visible. Lets say if I insert the lat & lon it will show on Map. Next when I put again Lat & Lon I want mine previous Pushpin to be delete and keep mine current pushpin visible. I tried with your mentioned code but it delete pushpin with in second.
Code:
 MapPoint.Map MP = axMappointControl1.ActiveMap;
                Pushpin pp = null;
                pp = MP.AddPushpin(loc,"hi");
                object o = "My Pushpins";
                try
                {
MapPoint.DataSet ds = axMappointControl1.ActiveMap.DataSets.get_Item(ref o);
ds.Delete();
                }
                catch{}
                }


Quote:
Originally Posted by Wilfried View Post
Hi,

This delete all your pushpins:

Code:
object o = "My Pushpins";
try {
   MapPoint.DataSet ds = MP.ActiveMap.DataSets.get_Item(ref o);
   ds.Delete();
catch {
   // Dataset does not exists
}
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-16-2008
Member
Yellow Belt
 
Join Date: Mar 2008
Posts: 37
Re: Delete previous pushpins

Hi,
Thanks Its working now. Thanks once again to Mike Mattys. What i did i creat a dataset in which i inserted pp.delete(); and then I add new pushpins. now it works fine... Thanks u people.
Regards.
Nasir
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
delete, previous, pushpins


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/delete-previous-pushpins-7494.html

Posted By For Type Date
Untitled document This thread Refback 08-21-2008 08:46 AM
Pushpin Tool Add-in - MP2K Magazine This thread Refback 04-16-2008 09:43 AM

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
delete previous pushpin toadd new one. nasirgul MapPoint 2006/2009 Discussion 11 08-27-2008 06:38 AM
delete all pushpins on a map bule MapPoint 2006/2009 Discussion 8 05-17-2007 01:19 PM
Need to add Pushpins, but be able to delete them easily BobFromBoston MapPoint 2006/2009 Discussion 1 04-18-2006 02:12 PM
Don't delete my pushpins! Anonymous MapPoint 2006/2009 Discussion 2 06-15-2004 11:39 AM
Add and Delete pushpins on mappoint Anonymous MapPoint 2006/2009 Discussion 3 06-12-2003 01:55 AM


All times are GMT -5. The time now is 10:57 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

Cheap Flights to Madeira
Save your money to spend out in Madeira. Use Holiday Hypermarket to find cheap flights to Madeira and cheap accommodation too.

City Break Europe
Take a City Break in Europe. Based on holidays booked this year, these are the most popular City Breaks for 2006

Holidays Cuba
When you book holidays in Cuba you will find a fascinating country with a heady combination of Spanish, African and Caribbean influences. Check our great deals.

Maldives Holidays
If you are looking for a serene, laid back break in the sunshine, Maldives holidays are the choice for you. Be enchanted by the Maldives!

Canaries
Find out all about the Canaries when you check out the ulookubook.com travel guides. Not only can you get a great holiday deal but you can find out useful information about potential holiday destinations.

Cheap family holidays
To plan cheap family holidays, use Travel.co.uk to explore all the delightful possibilities that there are.

Cheap Sharm Holidays
Get info on cheap Sharm holidays at On The Beach, and enjoy Egyptian nightlife!


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