jQuery.GoogleEarth plugin

739 views
Skip to first unread message

Julio Araya

unread,
Sep 26, 2012, 10:23:02 PM9/26/12
to google-earth-...@googlegroups.com
Hey guys!

  I've been working these days in a simple jQuery plugin for Google Earth API, you can download the code from https://github.com/delpho/jquery-GoogleEarth, i'm still writing the documentation...

I'll apreciate if you guys can give me some feedback ;)

regards!

barryhunter (KML Guru)

unread,
Sep 27, 2012, 1:15:41 PM9/27/12
to google-earth-...@googlegroups.com
One thing I notice, you seem to use a single $.googleEarth. 

Which suggests you cant have multiple instances. 

Would of thought something like

$('#map').GoogleEarth({sun: false});

would of been better. In the callback could do 

$('#map').GoogleEarth().getView()  or $(this).GoogleEarth()...


Julio Araya

unread,
Sep 27, 2012, 1:50:47 PM9/27/12
to google-earth-...@googlegroups.com

Thanks!, i'll see what i can do about it ;)

Morta

unread,
Sep 28, 2012, 7:50:43 AM9/28/12
to google-earth-...@googlegroups.com
 
Very interesting, thank you very much
I'm waiting for the documentation

Julio Araya

unread,
Oct 1, 2012, 8:15:52 PM10/1/12
to google-earth-...@googlegroups.com
I added some documentation at https://github.com/delpho/jquery-GoogleEarth

regards!

Morta

unread,
Oct 2, 2012, 5:26:02 AM10/2/12
to google-earth-...@googlegroups.com
Please could you give an example of how to load a KML or KMZ file?
I am interested in this possibility and also to load wms service
A greeting and thank you very much

Julio Araya

unread,
Oct 2, 2012, 8:40:00 AM10/2/12
to google-earth-...@googlegroups.com
Hey!

  Here some examples,  btw i need to update the documentation :)

//on the plugin loading
$.GoogleEarth({
   id: 'map',
   onComplete: function(instance){
      $.GoogleEarth.fetchKml('http://www.theurltoyourkml');
   }
});

//Or you can load the Kml file later
$.GoogleEarth.fetchKml('http://www.theurltoyourkml');

//Using a callback
$.GoogleEarth.fetchKml('http://www.theurltoyourkml', function(kml){
   if (kml) {
      //do some stuff, example: $.GoogleEarth.hideKml(kml);
   }
});

I'll take a look to the kmz and wms services soon...

regards!

barryhunter (KML Guru)

unread,
Oct 2, 2012, 9:07:48 AM10/2/12
to google-earth-...@googlegroups.com
fetchKml should work just fine for loading kmz files too. (ie the fetchKml from the Earth API does)


WMS would be more complicated (but still doable) - given a WMS input url, would have to build a network link. Can see how the WMS dialog works in Google Earth - try it out, and see the NetworkLink that is created. Would have to emulate that. 


If the WMS url defines the exact map/layer to plot its relativly easy. But if the API is expected to query getCapablities, that is significantly harder. Probably not worth doing - as it would probably having to build a user-interface, so the user could choose which layer to show, and woudl probably require a proxy to contact the WMS server. 

Morta

unread,
Oct 3, 2012, 4:10:52 AM10/3/12
to google-earth-...@googlegroups.com
Thank you so much for your work. I'll try.
greetings

 

Reply all
Reply to author
Forward
0 new messages