RE: [OpenMap Users] Moving the map like Google

From: Weisburd, Ben <benw_at_ll.mit.edu>
Date: Thu, 10 Apr 2008 19:46:56 -0400

Hi Jay,



I've attached subclasses of MapBean and ProjectionSupport.

We also had to subclass

BasicMapPanel so that createMapBean(Projection proj, Border border)

instanciated MyMapBean instead of a BufferedLayerMapBean, and had a custom main class

in place of OpenMap.java which instanciated MyBasicMapPanel.



Not sure if there is a better way to do all this, but hope this helps.



-Ben



-----Original Message-----
From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com] On Behalf Of Jay D. Askren
Sent: Thursday, April 10, 2008 10:40 AM
To: openmap-users_at_bbn.com
Subject: RE: [OpenMap Users] Moving the map like Google



I would be very interested in that code if you could post it somewhere.

I've been wanting to do the first item you mentioned but haven't had a

chance to do it.



Jay





-----Original Message-----

From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com]

On Behalf Of Weisburd, Ben

Sent: Thursday, April 10, 2008 10:12 AM

To: 'F.Bayliss'; openmap-users_at_bbn.com

Subject: RE: [OpenMap Users] Moving the map like Google



Hi Frank,



We are doing something similar for a weather display of the continental

US. It has to display large rasters of radar data and various overlays.

We did several optimizations to make google-like panning/zooming work

faster:

- Since the data was on the local disk, we made the map repaint once

when all layers are done rendering, and prevented the layers from

calling repaint() on themselves. This made interaction smoother and

avoided flicker.

- originally we used OMGraphics for the overlays, but this was slow

because they had to project themselves from lat/lon to pixel coordinates

every time the user panned or zoomed. Since we only needed to look at

the continental US, and had a fixed projection type, we treated the map

as a 2D grid with 0,0 being near Seattle. So we made OMGraphics store

everything in our grid's pixel coordinates instead of lat/lon.

- for the large raster images, we pre-generated tiles at several zoom

steps.



We had to do a lot of subclassing for this, but didn't have to modify

openmap source. Let me know if you want any of that code.



-Ben





-----Original Message-----

From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com]

On Behalf Of F.Bayliss

Sent: Thursday, April 10, 2008 6:12 AM

To: openmap-users_at_bbn.com

Subject: [OpenMap Users] Moving the map like Google



Hello,



I've been asked by my upper management to once again mimic the way

Google allows the user to move the map. I've spent a lot of time on

this, too much, and I don't see anyway it can work. I have several,

several layers and the time it takes to process and draw a map movement

event is slow and that results in a choppy map picture. I've tried

several approaches, the best being drawing the map to an image buffer

and replacing the map with that, letting them move what they think is

the map. But this isn't acceptable because it takes time to create the

image. I was hoping the experts had a better idea.



Thanks

Frank



--
[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"]
--
[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 Thu Apr 10 2008 - 19:48:47 EDT

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