Re: [OpenMap Users] Range Rings

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Tue, 18 Jan 2011 12:08:53 -0500

Hi Selcuk,

I would extend the OMRangeRing class so it also calculated the degree
interval lines for you and drew them as part of that new object.

You will have to override the generate and render methods, and add
member variables to hold the degree interval lines.

The tricky part is defining the lines. I'm assuming that you are
drawing the range rings based on ground distance? You can use the
GreatCircle.sphericalBetween method to come up with the points you
need, calculating the points along an azimuth from the center of the
range ring, and the distance intervals of the rings (use Length to
convert to radians for that method). Then, use the points for each
azimuth to create an OMPoly for that degree interval line. Sounds
like you want to make the line type for that OMPoly a LINETYPE_RHUMB,
so it's a line of constant bearing between the points. Repeat for
each interval line.

Don't forget to generate(projection) and render(Graphics) them in the
extended OMRangeRing class.

Hope this helps,

Don

2011/1/12 Selçuk BOZCAN <sbozcan_at_aselsan.com.tr>:
> Hi,
>
> I am trying to draw range circles on the map. I could simply use OMRangeRings, however I want to show degree intervals on my rings. What I mean is that, my circles should have perpendicular small lines every 10 or 15 degrees. What is the best way of doing this with OpenMap?
>
> Thanks in advance.
> Selcuk
> ######################################################################
> Dikkat:
>
> Bu elektronik posta mesaji kisisel ve ozeldir. Eger size
> gonderilmediyse lutfen gondericiyi bilgilendirip mesaji siliniz.
> Firmamiza gelen ve giden mesajlar virus taramasindan gecirilmekte,
> guvenlik nedeni ile kontrol edilerek saklanmaktadir. Mesajdaki
> gorusler ve bakis acisi gondericiye ait olup Aselsan A.S. resmi
> gorusu olmak zorunda degildir.
>
> ######################################################################
> Attention:
>
> This e-mail message is privileged and confidential. If you are
> not the intended recipient please delete the message and notify
> the sender. E-mails to and from the company are monitored for
> operational reasons and in accordance with lawful business practices.
> Any views or opinions presented are solely those of the author and
> do not necessarily represent the views of the company.
>
> ######################################################################
>
> --
> [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"]
>

--
[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 Tue Jan 18 2011 - 12:09:32 EST

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