On Monday, October 13, 2003, at 04:55 AM, Nicholas Wright wrote:
> Hi Don,
>
>>>> I think the answer to both of your questions is that OpenMap
>>>> projections are north-up. You can apply a AffineTransform to the
>>>> java.awt.Graphics object that the layers paint into, which should
>>>> result in something like the behavior your describe.
>>>
>>> But this wouldn't change the state of the projection though.
>>
>> True, but it doesn't need to, does it? The layers would keep up.
>> It's a small step to separating the projection from the view.
>
> OK - I will rephrase question - I don't think modifying the ShapeLayer
> to
> use an AffineTransform sounds right.
>
> I would like to view the north pole, with America at the bottom of an
> Azimuthal projection. I would then like to rotate the map so that the
> north
> pole is STILL in the centre of the map, but that Africa is now at the
> bottom
> of the map.
Oh, that's different than what I was thinking. You should be able to
set the latitude at 90 to place the map over the pole, and then set the
longitude accordingly. The earth should spin so that your longitude
line is pointing directly south.
>>> Is there some kind of code in the Shape layer which only moves it if
>>> both the new lat/lon points are different from the previous ones?
>>
>> The OpenMap layers generally only respond of the projection changes
>> (width, height, center, scale or type)
>
> That's what I've been trying to do. If the current map "center" is
> latitude
> 0, longitude 60, and I've been trying to call:
>
> map.setCenter( 0.0f, 50.0f );
>
> nothing happens.
>
> If I do:
>
> map.setCenter( (float)Math.random(), 50.0f );
>
> it works! The projection only appears to change if the new latitude is
> different from the previous one.
>
> I can't find the source code to confirm this theory. Is there an
> easier
> explanation?
The projection in the MapBean will change to whatever you set it to,
and the layers will be notified. The OpenMap layers should respond if
*any* parameters have changed. Otherwise, since they should be
containing OMGraphics for that projection, they should simply repaint
themselves.
Your map.setCenter(0f, 50f) call should be resulting in a map centered
over that point.
- Don
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [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 Mon Oct 13 08:29:33 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT