[josm-dev] Yahoo! Imagery through OpenLayers and wmsplugin
andrzej zaborowski
balrogg at gmail.com
Mon Sep 15 10:25:47 BST 2008
2008/9/15 Petr Dlouhý <petr.dlouhy at email.cz>:
> 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
Oops. This time attached as .txt as Dirk suggests, maybe it works. I
noticed I also changed the "ImageSize" to 1000 to get possibly better
resolution at low zoom, it's not related to rest of the patch.
> 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
Yes, resizeTo still works on the new gecko but it seems
gnome-web-photo 0.5 cannot know what the final width is and needs to
assume some default fixed amount, gnome-web-photo --help gives this:
-w, --width=W The desired width of the image (default: 1024)
and the resulting .png's are always 1024px wide by default, the yahoo
image is aligned to left and the rest of the png is filled with white.
This coincides with what I saw when I tried to re-add
MOZ_FORCE_PAINT_AFTER_ONLOAD support in ff3 - I couldn't find a way to
get the exact size, although I gave up too quickly, probably.
Regards
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: openlayers-repaint.txt
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20080915/c56a1d87/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: openlayers-makefile.txt
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20080915/c56a1d87/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: wmsplugin-yahoo.txt
URL: <http://lists.openstreetmap.org/pipermail/josm-dev/attachments/20080915/c56a1d87/attachment-0002.txt>
More information about the josm-dev
mailing list