RE: [OpenMap Users] Re centre map

From: Gatrell, Mark (UK) <mark.gatrell@baesystems.com>
Date: Thu Apr 22 2004 - 08:21:26 EDT

Don

        Thanks for your response..

        I have tried to reference my map bean from my layer, but to be honest I can't figure out how to do it.

        As you say a handle to the correct map bean needs to be established, then my setprojection calls will effect the map.

        Could you steer me in the right direction?

        Thanks again

        Regards

        Mark.

-----Original Message-----
From: Don Dietrick [mailto:dietrick@bbn.com]
Sent: 22 April 2004 13:11
To: Gatrell, Mark (UK)
Cc: Openmap-Users (E-mail)
Subject: Re: [OpenMap Users] Re centre map

               *** WARNING ***

This mail has originated outside your organization,
either from an external partner or the Global Internet.
     Keep this in mind if you answer this message.

On Apr 22, 2004, at 4:18 AM, Gatrell, Mark (UK) wrote:

>
> Don
>
> I am trying to re center my map on the result of a gps position
> change...
>
> I have been trying to understand Brian Hudson answer to Jaya back in
> Feb (RE moving icon)but have come to a dead end!
>
> My code so far is :- (Direct copy of Brians!) within my extended
> version of OMGraphicHandlerLayer.
>
>
> Proj proj = (Proj)getProjection().makeClone();
> proj.setCenter(newLatPosition,newLongPosition);
>
> This compiles fine..
>
> But I do not understand the next line...
>
> _map.setProjection(proj);
>
> I have tried to repaint my MapBean, but this has no affect.
>
> Would you be so kind as to explain _map ?

_map is probably a handle to a MapBean. You have to set the projection
on the map so that all of the layers know to react to the change.
Calling setProjection() fires events and will cause the layers to react
and repaint.

- Don

********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

--
[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 Thu Apr 22 08:23:11 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT