PDA

View Full Version : Google Maps API and WWJ applets


patmurris
09-15-2007, 09:42 PM
It just occurred to me that both a WWJ applet and the Google Maps API (http://www.google.com/apis/maps/documentation/index.html) can live in the same html page, and that the applet could 'talk' to the api to get at the imagery... Which would be legally right since WWJ would go through the api - if i understand well Google restrictions.

Note that communication between the two can go both ways : applet to javascript and javascript to the applet.

I've no idea how this would work yet, but it seems like an interesting combination ;)

Any comments or ideas regarding this possibility ?

fabrizio.giudici
09-16-2007, 09:42 AM
Cool idea. Ony a caveat: the way engineers/computer scientists/etc interpret logic is often completely different from the way lawyers do. :-) So I'd be careful about the interpretation of Google restrictions.

what_nick
09-16-2007, 10:02 AM
If the lawyer says is unfair usage and they are losing revenue, they will extend the policies to cover the loophole, and there is always http://www.flashearth.com/. It uses flash as the container instead of Java, same idea basically.

Cheers,

what_nick

TomServo
09-17-2007, 01:01 PM
Frome what I have heard.. flashearth is against the GMap TOS as well... but they are "ignoring" it (for now).

I would like to see a demo though.. because technicaly.. it is within the ToS :)

turman
09-18-2007, 02:24 AM
Frome what I have heard.. flashearth is against the GMap TOS as well... but they are "ignoring" it (for now).
I'm not a lawyer neither an expert in Google Maps but.. I really think it's against the GMap TOS since I don't see how they could fetch GMaps imagery into Flash without hacking GMaps HTTP requests. I mean the GMaps official API doesn't allow to fetch tiles like that. You can instanciance a map, configure it, and use it with markers, routes.. but no tiles fetching. See the API here: http://www.google.com/apis/maps/documentation/reference.html

Of course their JavaScript lib is offuscated so you have to reverse engineering their request protocol by the hand.

But one cool thing which could be easy to integrate into WW is their geocoding engine. It's really easy and powerfull. In my GeoFlexy webapp, I use it via their JS API, but you can also directly use their web service: http://www.google.com/apis/maps/documentation/services.html#Geocoding_Direct
Very easy and totaly legal since the limitation is only about the number of requests:

There is a limit of 50,000 geocode requests per day per Maps API key. This translates to roughly one geocode request every 1.73 seconds. If you go over this 24-hour limit, the Maps API geocoder may stop working for you temporarily. If you continue to abuse this limit, your access to the Maps API geocoder may be blocked permanently.

and..

Your service must be freely accessible to end users. To use Google mapping technology in other types of applications, please use Google Maps for Enterprise.

Hmm I'll try it and keep you posted.. :)

I would like to see a demo though.. because technicaly.. it is within the ToS :)
For me it would be even nicer to see a Virtual Earth plugin into WWJ because MS seems to be easier about their imagery than Google.. Oops it must be the first time I say that MS is better than Google! :eek:

TomServo
09-18-2007, 02:57 AM
It gets easier each time to say MS is better than Google ;)

Google is good at "selective enforcement" ... they only enforce some stuff when they get called out on it.

patmurris
09-18-2007, 04:36 AM
The thing with MS Virtual Earth tiles is they are not in lat/lon projection... whereas Google tiles are. But i agree, VE in WWJ would be great too - and probably fine with MS since the .net version has had such a plugin for some time now with their benediction.

withak
09-18-2007, 04:57 AM
I think the only thing the VE people requested was to have a MS logo visible when their data was visible, so we made the plugin put a small MS icon in the lower right corner of the screen when the layer is on.

edit: I think maybe they also wanted a notice on the web page and installer reminding that the images aren't PD.

m_k
09-18-2007, 09:10 AM
The thing with MS Virtual Earth tiles is they are not in lat/lon projection... whereas Google tiles are.
Hmm... you sure? I thought that both Google Maps and VE use Mercator projection (and GE uses lat/lon).

TomServo
09-18-2007, 12:58 PM
I think the only thing the VE people requested was to have a MS logo visible when their data was visible, so we made the plugin put a small MS icon in the lower right corner of the screen when the layer is on.

edit: I think maybe they also wanted a notice on the web page and installer reminding that the images aren't PD.

Well, 90% of that is taken care of then :) Just need to add the logo/link for when the layer is on in WWJava.

Wish we had gotten Yahoo to buy in on using their imagery.. but they were unsure they could handle the increased bandwidth, so opted out for now.

patmurris
09-20-2007, 03:23 PM
Hmm... you sure? I thought that both Google Maps and VE use Mercator projection (and GE uses lat/lon).
I'm not sure... i kind of assumed both gmaps and ge use the same servers and source imagery with the same projections, but for a flat map like gmap, lat/lon wouldnt work. Hmm...:rolleyes:

withak
09-20-2007, 03:39 PM
I think I remember reading that gmaps and GE use different datasets because of licensing agreements dealing with the way that some of the imagery can be distributed.

m_k
09-20-2007, 10:06 PM
GMaps used lat/lon at the very beginning, but soon they changed the projection to Mercator (according to Wikipedia (http://en.wikipedia.org/wiki/Google_Maps#Development_history_until_re cent_issues) it was on July 22, 2005). BTW It's one of the reasons why The Plugin That Shall Not Be Named is useless now... :P
Datasets are separate - when an update for GE is released it usually takes a few days for Maps to get it too; GE data looks like a 'patchwork', whereas in Maps there is seamless Landsat mosaic, higher-res spots are visible only after zooming in. Also AFAIK there are (or at least there were) different sets for GMaps and GMaps API.

withak
09-20-2007, 10:18 PM
The Plugin That Shall Not Be Named would just need to reproject in the same way that the VE plugin does. ;)

what_nick
09-21-2007, 05:27 AM
The plugin that shall not be named with VE mods was used by people that shall not be named to get the company that shall not be named banned from Google for a day.

Chade
09-21-2007, 05:28 AM
The plugin that shall not be named with VE mods was used by people that shall not be named to get the company that shall not be named banned from Google for a day.
Resulting in many lulz.

withak
09-21-2007, 02:16 PM
The whole company???

turman
09-23-2007, 12:07 AM
But one cool thing which could be easy to integrate into WW is their geocoding engine. It's really easy and powerfull. In my GeoFlexy webapp, I use it via their JS API, but you can also directly use their web service: http://www.google.com/apis/maps/documentation/services.html#Geocoding_Direct

I did a small search box using Google Maps for geocoding an address textfield into LatLon. It works pretty good so I included it into GeoFlexy (http://forum.worldwindcentral.com/showthread.php?t=10783):
http://pix.nofrag.com/5/e/2/f59f69e7cb7468d639503f8f2be9e.jpg (http://pix.nofrag.com/5/e/2/f59f69e7cb7468d639503f8f2be9e.html)
For non french readers who wants to test, here is the direct link for applet: http://www.onlacherien.org/geoflexy/applet/applet.gsp

heidtmare
02-12-2008, 09:36 PM
I'd be really happy if WWJ could communicate with OpenLayers.
That would truly be a powerhouse combo.
http://www.openlayers.org/
Then we'd be able to use all our favorite mapping services through the openlayers api.