Re: [OpenMap Users] OMCircle Distortion?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Mon, 28 Jul 2008 15:12:37 -0400

Hi Chris,

Christopher Franklin wrote:
> Greetings,
>
> I am working on a project that requires a user to select an area on the
> map by using a circle. The user clicks to select the center and then
> again to select the edge (radius). I am using an OMCircle because it
> exhibits the proper behavior for a circle on a globe.
>
> I have noticed a problem with the OMCircle though. After drawing it
> using the provided center and radius I am adding a graphic to represent
> the center and another to represent the rightmost edge of the circle.
> When the circle is drawn on or near the equator everything appears
> correct. However, if the circle is drawn north or south there is a
> noticeable distortion in how the circle and the edge handle are drawn. I
> have done some experimentation and discovered that the handle is being
> drawn in the correct location, but the edge of the circle is not. The
> further away from the equator the greater the discrepancy between my
> handle location and the OMCircle edge. If, however, I move the handle to
> the top of the circle it is always drawn in the correct location. For
> usability purposes I would like the handle to be on the right hand side!
> Is there a way to fix this? If not, I guess they will have to deal with
> the handle being on the top or bottom of the circle...

How are you creating the handle location, and what are its location
parameters? How do you know the handle is in the right place?

OMCircles created with distance radius shouldn't appear as circles in
certain projections when you move away from the equator. Pixel distance
from the center will vary along the circle edge for the same distance
(depends on latitude, angle on edge from center).

>
> Another problem I would like to bring up is when zoomed in to a small
> area (~1m scale) the OMCircle draws as a polygon approximation of a
> circle. Is there a way to increase the number of segments being drawn at
> that low of scale?
>

OMCircles let you set the number of segments used to represent the
circle, but you might be seeing a precision problem that occurs from
using floats in the OMCircle. The next version of OpenMap will address
the precision problem.

Hope this helps,

Don

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Jul 28 2008 - 15:12:59 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT