Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Delete previous pushpins 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 { }
}
|
| |||
| 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
}
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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{}
}
|
| |||
| 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 |
![]() |
| Tags |
| delete, previous, pushpins |
| ||||
| 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 | |
| |
| ||||
| 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 |
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!