Re: [OpenMap Users] ServerMapTileFactory and UI responsiveness

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Tue, 9 Apr 2013 13:43:58 -0400

Hi Gary,

I'll have to look into this. The layer fetches the tiles in a separate thread, so the GUI shouldn't block. What OS and jdk version are you using?

- Don

On Apr 8, 2013, at 9:32 PM, Gary Briggs wrote:

> Afternoon,
>
> I'm using openmap in a project where users can click on zip codes and
> an openmap window scrolls to those zip codes and highlights them.
>
> That's working great, and is very speedy. The problem I'm suffering is
> that as soon as I include a ServerMapTileFactory, UI responsiveness and
> performance plummets; it's as if the network queries are being done
> on the same thread as the rest of the Swing event queue, causing it to
> block for as long as it takes to download a tile.
>
> This demonstrates the issue:
>
> OverlayMapPanel omp = new OverlayMapPanel();
> MapHandler mapHandler = omp.getMapHandler();
> ServerMapTileFactory serverMapTileFactory =
> new ServerMapTileFactory("http://otile1.mqcdn.com/tiles/1.0.0/map/");
> // From http://developer.mapquest.com/web/products/open/map
> MapTileLayer mapTileLayer = new MapTileLayer(serverMapTileFactory);
> mapHandler.add(mapTileLayer);
>
> Dragging it around at various zoom levels soon begins to lag the rest
> of the UI, and any code in the rest of the UI that makes the map move
> a long way causes the rest of the UI to become unresponsive.
>
> For example, I have code that creates a new EsriPlugIn, then calls
> openMapPanel.getMapBean().setCenter(esriplugin.getDataBounds().getCenter());
> This essentially locks the UI until all the tiles have been loaded,
> which sometimes takes a while.
>
>
> So, the question; is there a way to get the maps download
> asynchronously? Or am I doing something totally wrong here?
>
> Thank-you!
> Gary
>
> --
> [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 Tue Apr 09 2013 - 13:45:13 EDT

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