Hi Jeremy:
It seems that you could use the getLatLonArray() method to
obtain the list of vertices. Search over this list to find the
maximum and minimum for both the latitude and longitude. Then
further process these by "shrinking" them to the edges of the
projection ( if necessary ) by getting the projection coordinates
getLowerRight() and getUpperLeft() . Finally find the midpoint
between the two left over points. This should work. If you want
something that is more like the "centroid" then you could average all
the points coming back from getLatLonArray(). ( you may want to throw
out the points which are outside of the projection...)
I don't know what your OMPoly contains, so I don't know what would
look better.
-C-
At 9:11 AM -0500 12/18/01, Jeremy Zacker wrote:
>I'm trying to determine the center point of the visible part of an
>OMPoly so that
>I can place a custom icon on that spot. I'm having trouble figuring
>this out.
>First I need the visible portions of the OMPoly, then I need to
>determing the center of the line
>because the icon I wish to place must be on the line. Anyone try
>something like this?
>
>--
>Jeremy "Slacker" Zacker - "BLAH!"
>MCS Blk IV
>(732) 450-7066
>
>
>--
>[To unsubscribe to this list send an email to "majdart@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@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Tue Dec 18 13:11:53 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT