Page 1 of 1

Adding a map point with a radius

Posted: Tue Apr 06, 2004 5:49 pm
by 9336214
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

Posted: Tue Apr 06, 2004 7:29 pm
by Marjan
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.

Posted: Wed Apr 07, 2004 4:44 pm
by 9336214
Thanks for the response.

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

Thanks
Ed Dressel

Posted: Fri Apr 09, 2004 4:16 am
by Marjan
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.