Adding a map point with a radius

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Ed
Newbie
Newbie
Posts: 33
Joined: Tue Mar 09, 2004 5:00 am
Location: Oregon, USA
Contact:

Adding a map point with a radius

Post by Ed » Tue Apr 06, 2004 5:49 pm

Is it possible to add a point to a map series that has a longitude, latitude (I know how to do that from your previous exampe) and also a radius in miles?

Thanks
Ed Dressel

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Apr 06, 2004 7:29 pm

Hi, Ed.

Draw a circle with specific x,y coordinate and radius ? The easeiest way to is to use chart Canvas.Circle method in chart OnAfterDraw event to draw a circle at specific coordinate and with specific radius. To transform from real world coordinates to screen coordinates (canvas methods require screen position) you can use TChartAxis CalcXPosValue, CalcYPosValue and CalcSizeValue methods.
Marjan Slatinek,
http://www.steema.com

Ed
Newbie
Newbie
Posts: 33
Joined: Tue Mar 09, 2004 5:00 am
Location: Oregon, USA
Contact:

Post by Ed » Wed Apr 07, 2004 4:44 pm

Thanks for the response.

How do I know how far a mile is in pixels on a given map?

Thanks
Ed Dressel

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Fri Apr 09, 2004 4:16 am

Hi, Ed.

You could use theTChartAxis.CalcSizeValue method to transform from real distance to "pixel distance". The result of this method is the amount in pixels that corresponds to a portion of the axis of size "Value" in axis scales.
Marjan Slatinek,
http://www.steema.com

Post Reply