thientung / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 0 forks source link

Various updates that allow synchronous fetching of Kml for resolving networklinks. #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
*) Correct spelling of Handler
*) Replaced LoadKmlCallback with more generic InvokeCallBack allowing
JScript to decide which .Net callback to call.
*) Add Tag property to GEEventArgs  
*) Changed OnKmlLoaded signature to use new GEEventArgs Tag property to aid
call of InvokeCallback.
*) Added some COM Helper methids found from MSDN blog.
*) Added OnKmlFetched along with Thread Handle locking and KmlObject Cache.
*) Added FetchKmlSynchronous that returns a IKmlObject without adding to
GEWebBrowser instance. This helps resolve NetworkLinks.
*) Added additional parameter to LookAt so it can access GEWebBrowser
instance to call new FetchKmlSynchronous.
*) Allow LookAt to look inside NetworkLinks for AbstractViews.
*) Refactored LookAt.
*) Removed throw from GEStatusStrip when getStreamingPercent occasionally
throws COM exception.
*) Removed requirement in FetchKml that disallows paths ending in kml/kmz.
This inhibits using CGI scripts as kml sources.
*) Added ParseKml method that will render Kml string.
*) Updated JScript to use new createCallback function.

All these will help further development resolving network links.

Original issue reported on code.google.com by blai...@gmail.com on 21 Oct 2009 at 12:44

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, 

Thanks so much for the patch. I am away in Poland at the moment but I will take 
a
good look through when I get back next week. It all sounds great.

Thanks again,

F.

Original comment by fraser.c...@gmail.com on 22 Oct 2009 at 9:18

GoogleCodeExporter commented 9 years ago

Original comment by fraser.c...@gmail.com on 25 Oct 2009 at 10:08

GoogleCodeExporter commented 9 years ago

Original comment by fraser.c...@gmail.com on 27 Oct 2009 at 12:44

GoogleCodeExporter commented 9 years ago
I have implemented most of these but messed up the commit comments as my laptop 
crashed 
:( I will document the changes asap. Thanks again for the patch and your input. 
Fraser.

Original comment by fraser.c...@gmail.com on 30 Oct 2009 at 1:37

GoogleCodeExporter commented 9 years ago
Hi blairuk,

I was wondering if you could send/post some usage examples of the 
FetchKmlSynchronous 
method so I can add it to the wiki? No worries if not it is just I really don't 
seem 
to use network links and I am a little sure about how you envisaged it would be 
implemented.

Thanks,

F.

Original comment by fraser.c...@gmail.com on 5 Nov 2009 at 4:17

GoogleCodeExporter commented 9 years ago
In theory, it allows a tree to be expanded with elements from a network link 
like in 
the examples at 
http://www.gearthblog.com/blog/archives/2007/04/the_google_earth_net.html 

It certainly works on the network links i've created. Network links return kml 
only 
once the data is downloaded or parsed and this is once the container becomes 
visible.  

Original comment by blai...@gmail.com on 5 Nov 2009 at 5:13

GoogleCodeExporter commented 9 years ago
Ah OK, I was just being slooooow :)

Original comment by fraser.c...@gmail.com on 5 Nov 2009 at 6:59

GoogleCodeExporter commented 9 years ago
Hmm, 

OK I am still being slow I guess...What I thought was that I would call.

geWebBrowser1.FetchKmlSynchronous("http://bbs.keyhole.com/ubb/download.php?Numbe
r=373671");

and then once the file had loaded that the GEWebBrowser.KmlLoaded event would 
fire allowing me to add the features to 
the treeview and plugin. When I first patched the source I thought that this is 
what happened but now I don't seem to 
be able to get it to work at all :(

Is the above how it is meant to work or am I confusing myself (it has been a 
long day!) If it is not then could you 
post a usage example please?

Sorry for being slow!

F.

Original comment by fraser.c...@gmail.com on 5 Nov 2009 at 7:23

GoogleCodeExporter commented 9 years ago
FetchKmlSynchronous loads a remote KML/KMZ file and presents the contents of 
the file 
as a KmlObject. It does raise any events hence the name "*Synchronous". There's 
a 
usage example in the patch I provided that handles NetworkLinks. A network link 
is 
effectively a Href to a remote KML/KMZ file (or even CGI script). I used the 
above 
method to load the KML from this remote file and used the resultant KmlObject 
for 
parsing and adding to the tree. I also used the method to find the AbstractView 
of a 
network link so when double clicking on the treeview node the correct LookAt is 
processed. This is much like how the GoogleEarth client treeview works.

Hope that helps :)

Original comment by blai...@gmail.com on 5 Nov 2009 at 9:13