MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Deleting pushpins

This is a discussion on Deleting pushpins within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I can easily add a pushpin using the activeMap.AddPushpin( pointOfInterest, name) function. But what if I want to delete them ...


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 (4) Thread Tools Display Modes
  4 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 02-19-2008
Senior Member
Green Belt
 
Join Date: Jul 2005
Posts: 105
Deleting pushpins

I can easily add a pushpin using the

activeMap.AddPushpin( pointOfInterest, name)

function. But what if I want to delete them all?

Is there a MapPoint function which removes the pushpins??


thanks,
Bob
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 02-19-2008
Senior Member
Green Belt
 
Join Date: Jul 2005
Posts: 105
Re: Deleting pushpins

I need the C# version of this code:



'delete all datasets
For Each objDS In objMapNew.DataSets
If objDS.RecordCount > 0 And (objDS.DataMapType = 4 Or objDS.DataMapType = 10) Then
objDS.Delete
End If
Next

I am having trouble in particular with converting this:

objDS.DataMapType = 4

to this:

geoDataMapTypePushpin

I can not find the how to reference it.


Bob
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 02-19-2008
Senior Member
Green Belt
 
Join Date: Jul 2005
Posts: 105
Re: Deleting pushpins

I got it working fine.

Thanks. No need to answer...


Bob
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 02-20-2008
lfdmike's Avatar
Member
Green Belt
 
Join Date: May 2004
Posts: 54
Blog Entries: 7
Re: Deleting pushpins

Could you please post the translated code for the benefit of others
__________________
Mike Mueller
Lannon Fire Department
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 02-20-2008
Senior Member
Green Belt
 
Join Date: Jul 2005
Posts: 105
Re: Deleting pushpins

if (axMappointControl2.ActiveMap != null)
{
foreach (MapPoint.DataSet dataSet in axMappointControl2.ActiveMap.DataSets)
{
if (dataSet.RecordCount > 0 &&
(dataSet.DataMapType == MapPoint.GeoDataMapType.geoDataMapTypePushpin ||
dataSet.DataMapType == MapPoint.GeoDataMapType.geoDataMapTypeTerritory))
{
dataSet.Delete();
}
}
}


Bob
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 02-20-2008
lfdmike's Avatar
Member
Green Belt
 
Join Date: May 2004
Posts: 54
Blog Entries: 7
Re: Deleting pushpins

Thank you. I don't use C# that much, but it may help others
__________________
Mike Mueller
Lannon Fire Department
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
deleting, pushpins


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/deleting-pushpins-7163.html

Posted By For Type Date
Using MapPoint In Delphi - MapPoint Articles - MP2K Magazine This thread Refback 02-24-2008 02:25 PM
Reverse Geocoding, Another Method - MapPoint Articles - MP2K Magazine This thread Refback 02-20-2008 07:47 PM
Finding the Starting Point of a Route - MapPoint Articles - MP2K Magazine This thread Refback 02-20-2008 07:45 PM
The Magazine for MapPoint - MP2K Magazine This thread Refback 02-20-2008 10:06 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
Tracking User Actions in Maps (deleting pushpins) joe lion Development 2 12-07-2007 10:04 AM
Deleting selected objects on the map?? VC_Man MapPoint 2006/2009 Discussion 5 02-07-2007 02:59 AM
Deleting pushpins in bulk brianmcg MapPoint 2006/2009 Discussion 1 06-22-2006 02:08 PM
Stop Users from Deleting or Cutting Pushpins from map view Yazzy MapPoint 2006/2009 Discussion 1 05-26-2005 03:56 PM
New map (Deleting) Anonymous MapPoint 2006/2009 Discussion 0 07-21-2004 04:21 AM


All times are GMT -5. The time now is 12:22 PM.


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 55