Community of VE/MapPoint Users and Developers
This is a discussion on How to draw a rectangle with text in it? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Language: VC++ Using: Mappoint 2006 Project: Embedded MappointCtrl in client-app Hello hardcore programmers , I want to let the user ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| How to draw a rectangle with text in it? Using: Mappoint 2006 Project: Embedded MappointCtrl in client-app Hello hardcore programmers ,I want to let the user draw a rectangle as a kind of a zone. My app needs to convert the anglepoints of the rectangle into a gps-position. This is easely done by calling the XYtoLocation() method. But the problem is, if I want to draw a rectangle by hand, than I need drawing toolbar. That is what I want to prevent. There is another way to get this around, but not good enough. I can use the GetSelectedArea() method and convert the retrieved coordinates into Latitude and Longitude. But when I want to draw a recangle using the AddShape() methode, than for a rectangle the Width and the Height (MUST) have to be in km/miles. While I just have it in pixels or latitudes/longitudes, so I need to convert the pixels in km's wich depends on the altitude also. So my question is, how can I solve this? Is there an easy way (maybe there is a useful mappoint function), or do I have to find out what kind of messages I need to send to mappoint for simulating a pushed 'draw rectangle'-button? |
| |||
| Re: How to draw a rectangle with text in it?
Hi, You can use Distance method to calculate the distance to the several Location objects. As 3th option you could do the drawing yourself as the user drag with the mouse or so, but you need to do same calculations as with the selectedarea.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: How to draw a rectangle with text in it?
Hi Wilfried, Thank you very much for your reply, I'm sorry I didn't react on your response earlier, but I've totaly forgotten, because I solved the problem. When I encounterd this problem I didn't thaught to calculate the distance between locations, I wasn't even aware of the existence of the method to calculate distance between two locations. Anyway, like you said, the solution is calculating the distance in km. Thank you Wilfried. |
![]() |
| Tags |
| draw, rectangle, text |
| ||||
| Posted By | For | Type | Date | |
| Map Visitors - Powered by Virtual Earth | This thread | Refback | 12-11-2006 09:18 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to calculate Lat/Longs for the corners of a rectangle? | Anonymous | MapPoint 2006/2009 Discussion | 2 | 01-29-2005 05:18 AM |
| Get all pushpins in a shape (Radius, Rectangle ...) | kobkob | MapPoint 2006/2009 Discussion | 2 | 04-18-2004 05:44 AM |
| How to create a "rotated" rectangle in Mappoint | spideybud | MapPoint 2006/2009 Discussion | 2 | 11-13-2003 02:02 PM |
| Values of area in rectangle | Matrices | MapPoint 2006/2009 Discussion | 1 | 11-13-2003 01:16 PM |
| How do I draw a circle, rectangle, ellipse or free.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 05-26-2000 01:35 PM |