RE: [OpenMap Users] Re-centre Map in 4.6.1

From: Gatrell, Mark (UK) <"Gatrell,>
Date: Mon, 24 Jan 2005 10:36:01 +0000

Hi Don/Ben

        Ok Ok Ok .. I was having another off day!

        Sad thing is, I had already tried the _map.setCenter(lat,lon) but had failed to pick up the mapbean from findandinit.


Thanks for help.. its working fine now.

Another question though if you dont mind(There's always one more question!).

I have developed my application as an application running on a standalone PC, How much change is there to make it run as an applet? Am I correct in thinking that if I run it as an applet, the tools are there to view the map display via the internet etc?


Regards

Mark


-----Original Message-----
From: Don Dietrick [mailto:dietrick_at_bbn.com]
Sent: 21 January 2005 16:18
To: Gatrell, Mark (UK)
Cc: Openmap-Users (E-mail)
Subject: Re: [OpenMap Users] Re-centre Map in 4.6.1


               *** 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.

Hi Mark,

How about calling _map.setCenter(lat, lon)?

You can get a handle to the MapBean from the findAndInit(Object obj)
method (the mapbean comes as an Object, you have to test and grab the
handle), but you can also grab the MapBean from the Projection object.

- Don


On Jan 21, 2005, at 3:35 AM, Gatrell, Mark (UK) wrote:

>
> Hi
> I have recently upgraded to v4.6.1 and have found that I now, can't
> re-centre my map programmatically.
>
> I was previously using this code:-
> ------------------------------------------
> MapBean _map;
>
> Proj proj = (Proj)getProjection().makeClone() ;
> proj.setCenter(newLatPosition,newLonPosition );
> _map.setProjection(proj);
>
> this.repaint();
>
> ------------------------------------------
>
> It would seem that I need to obtain the Mapbean some other way.. I
> have looked at the forum archive and the example uses the mouse event
> to obtain the MapBean using
>
> MapBean map = (MapBean)e.getSource():
>
> I am not using the mouse to trigger the change.. I am using the latest
> gps location read in from my receiver.
>
> Could anyone explain where I am going wrong ?
>
> I am trying to re-centre from my extended OmGraphicHandlerLayer!
>
> Thanks for your help
>
> Regards
>
> Mark.
>
> ********************************************************************
> 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_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



********************************************************************
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_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Jan 24 2005 - 05:43:56 EST

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