Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| How to find a pushpin from a mouse-click 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 |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| find, mouseclick, pushpin |
| ||||
| 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 | |
| |
| ||||
| 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 |