MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to find a pushpin from a mouse-click

This is a discussion on How to find a pushpin from a mouse-click within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm writing a simple standalone mapping app, and need to detect which pushpin a user has clicked on. I've 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 12-12-2007
Junior Member
White Belt
 
Join Date: Dec 2007
Posts: 2
How to find a pushpin from a mouse-click

I'm writing a simple standalone mapping app, and need to detect which pushpin a user has clicked on. I've tried the following

MapPoint.FindResults findresults = Map.ObjectsFromPoint(e.x, e.y);
object index = null;
for (int i = 0; i < findresults.Count; i++)
{
... etc
}

but it doesn't return any pushpins, only streetnames/countries, etc. When you click on a map, you get a popup with the things close to where you clicked, including pushpins, so it must be possible.

thanks, A
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 12-14-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: How to find a pushpin from a mouse-click

Hi,

You can use SelectionChange event for this. There you check if the selected object is a pushpin, if it is you can check which one by comparing it's name. Eventually you can have also in your application an array of pushpins. then you can compare by the objects address.
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 12-14-2007
Junior Member
White Belt
 
Join Date: Dec 2007
Posts: 2
Re: How to find a pushpin from a mouse-click

Thanks Wilfredm I'll give that a try
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
find, mouseclick, pushpin


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/how-find-pushpin-mouse-click-6881.html

Posted By For Type Date
The Magazine for MapPoint - MP2K Magazine This thread Refback 12-14-2007 04:58 PM
The Magazine for MapPoint - MP2K Magazine This thread Refback 12-12-2007 11:11 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
Pushpin on click event JoeBo Development 1 10-16-2007 05:49 PM
A simple map with a pushpin on click cojmezek MapPoint 2006/2009 Discussion 1 10-13-2005 02:54 AM
find city name & state name on mouse move event Atul22 MapPoint 2006/2009 Discussion 2 10-15-2004 05:28 AM
Double Click on a Pushpin Anonymous MapPoint 2006/2009 Discussion 4 02-28-2004 07:26 PM
Mouse Click on legend Anonymous MapPoint 2006/2009 Discussion 0 07-10-2003 06:39 PM


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