[OSM-talk] Subject: JOSM and Yahoo Imagery

Dave osm.list at randomjunk.co.uk
Thu Jan 18 14:51:22 GMT 2007


On 1/18/07, Nick Burch <openstreetmap at gagravarr.org> wrote:
>
> On Thu, 18 Jan 2007, Frederik Ramm wrote:
> > It is a difficult topic as current agreements seem to allow only access
> > through their JavaScript API which cannot be directly controlled from
> > within a Java application.
>
> Java 1.6 has a javascript runtime built in. Has anyone had a chance to
> play with it? (I was thinking we could use it to load the yahoo js,
> provide override the image display functions, and use this to grab the
> images. However, I don't know if that sort of thing is possible with the
> Java 1.6 JS stuff)


You just need the rhino JAR to be able to run javascript (
http://www.mozilla.org/rhino/), which is probably better than putting a
reliance on 1.6.
Unfortunately, the yahoo JS will rely heavily on the browser DOM to do
things like download images, decide where to put things etc. So while
running js from java is easy (about 3 lines of code), the complicated bit of
embedding in something like JOSM would be to properly mock the browser
environment with enough detail to get the yahoo js to actually run without
throwing errors.
I was actually gonna take a look at how complicated this might be at the
weekend. I'm guessing not easy.
If anybody knows of an open source mock broswer dom project... that would
probably help.

What I'd avoid doing is trying to reverse engineer yahoo's js, and figuring
out which bits could be overridden... firstly yahoo might not like that, and
secondly, any change in their code would almost certainly break any
implementation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20070118/874d3c1c/attachment.html>


More information about the talk mailing list