[josm-dev] Yahoo! Imagery through OpenLayers and wmsplugin

Petr Dlouhý petr.dlouhy at email.cz
Mon Sep 15 06:41:56 BST 2008


On Mon, 15 Sep 2008 05:15:01 +0200, andrzej zaborowski <balrogg at gmail.com>  
wrote:

> Hi,
>   I tried yesterday to decide what's the best way to support Yahoo!
> imagery with firefox 3 (or rather without ff 2). First I checked out
> the OpenLayers plugin from Francisco Santos and tried to see what was
> left to be done in it.  I like the idea of the plugin but there seem
> to be unresolved design issues.
>
> Firstly, it does a switch from firefox to a java based browser for
> downloading. Aside from the size of the file, this browser is slower
> for me and causes josm to hang for a couple of seconds when loading
> yahoo for the first time. On the other hand scrolling the mapview
> doesn't spawn new processes like it would be with firefox so it's
> smoother.  Perhaps it could be put into a thread of its own.
>
> Then the first thing that I found annoying was lack of progress
> indication when downloading, so the first patch attached makes the
> layer contents be displayed progressively as they're loaded.  Then
> there's the issue with positioning and scalling the layer contents -
> the code to do this is disabled with a "TODO wrong calculations"
> comment.  I found the calculations are actually correct but the whole
> idea of chaging the map view according to the layer requirements is
> bad.  In this case it causes infinite recurrency because updating the
> view causes the open layer update (possibly download of new tiles) and
> a map view update again.  Then it also implies restricting josm map
> view to only the zoom levels supported by the openlayer, I think this
> will be absolutely unusable.
>
> So I had an idea to reuse GeorefImage from WMSPlugin and store the
> openlayer contents and scale and position them when necessary.  But
> then I checked out the latest WMSPlugin and found that some yahoo
> imagery support was added there with seemingly all the things I
> needed, even the download is done in a separate thread and tiles are
> downloaded automatically.  I installed gnome-web-photo 0.5 and it
> basically works, with firefox 3 and wmsplugin, but the tiles were
> displayed wrongly.  It took a lot of wrapping my head around it to
> understand out why (basically firefox 3 / gnome-web-photo alwyas
> return images enlarged to some constant window width and we have no
> way to communicate the downloaded yahoo image width from browser back
> to josm).  I managed to work around it and while there are new gecko
> processes spawned all the time (like with ywms) it is quite usable and
> works with firefox 3. The third attached patch is the work around.
>

Hello, I the author of the changes in WMSPlugin. There is much more info  
about the changes in this list. Unfortunately, the patches didn't go  
through the mailing list, so I don't know, what you changed. You have the  
same problem with badly displayed tiles, as Dirk has. The web page is  
affecting the result image size by changing it's size (by  
window.resizeTo), and it works for me (with gnome-web-photo 0.3 on Ubuntu  
Intrepid). I will try to compile gnome-web-photo 0.5 in order to find out  
the problem.

>
> The middle patch adds a hacky Makefile for building OpenLayers so that
> I could build the plugin with just jdk and vim and without installing
> all the Ant / Eclipse bloat, in case any one is interested.  ywms and
> wmsplugin can be built similarly.
>
> I think next should be merging the openlayers downloader into a
> special wmsplugin wms layer, including the embedded browser in java.
> and then adding configuration options, but in the meantime I'm happy
> with how wmsplugin + gnome-web-photo 0.5 work for tracing over yahoo.
>
> Cheers



-- 
Petr Dlouhý




More information about the josm-dev mailing list