MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to draw a rectangle with text in it?

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 ...


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 (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 12-06-2006
Member
Green Belt
 
Join Date: Nov 2006
Posts: 87
How to draw a rectangle with text in it?

Language: VC++
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?
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-07-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
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-12-2006
Member
Green Belt
 
Join Date: Nov 2006
Posts: 87
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.
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
draw, rectangle, text


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/how-draw-rectangle-text-5444.html

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

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
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


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