How do I prompt a user to load a kml when using the plug-in?

7 views
Skip to first unread message

Medlock

unread,
Oct 29, 2009, 1:04:12 PM10/29/09
to KML Developer Support - Google Earth Plug-in
Usually I would use a hyperlink from a description, but when a kml is
loaded in the plugin, an href in the description doesn't load a kml
properly. Any ideas?

fraser (Earth API Guru)

unread,
Oct 29, 2009, 1:20:12 PM10/29/09
to KML Developer Support - Google Earth Plug-in
Hi Medlock,

Sorry, you would need to explain what you mean a bit better or better
yet post a link to an example page.

Thanks.

F.

jmatthews

unread,
Oct 29, 2009, 2:28:55 PM10/29/09
to KML Developer Support - Google Earth Plug-in
I'm not sure what you mean, either. Do you literally mean "prompt" a
user, or do you want to give the user an option to load from a pre-
determined list of kml's that are available?

For the first scenario, see Roman's Demo in the Demo section on
loading the KML dom. I think it's on the 2nd or 3rd page of demos.
There, he let's you fill in the path of any kml from anywhere on the
web. If you fill in a non-existent one or a bad file, it will, of
course, fail to load it.

For the second scenario, you are welcome to look at my page source at
http://sovereignstates.net/StateLegislators/VSLegislators.htm

My source might not be as pretty as some, but the logic is there and
seems to flow well. Plus, I am still working on it.... Showing and
hiding layers works well, though.

jmatthews

unread,
Oct 29, 2009, 2:59:42 PM10/29/09
to KML Developer Support - Google Earth Plug-in
Medlock, apparently I have an incompatibility issue on my example, and
it does not wok in IE. I am sure it is insignificant, and it will be
an easy fix. To see it in action, use Firefox or Chrome.

In the meantime, I will check into the IE issue. I am guessing it is
a CSS styling issue, but will have to work on it a little later.

Medlock

unread,
Nov 4, 2009, 5:48:00 PM11/4/09
to KML Developer Support - Google Earth Plug-in
Thanks for the replies. I will try to clarify my problem with an
example. I posted a sample kml in the plugin here

http://sites.google.com/site/recarguelasesuelas/

There is a placemark with an href in the description. The href points
to a URL of a .kml file. When the kml opens, the native application
for .kml is used and the file is loaded into the temporary places in
google earth. I don't want the link to open google earth. I want the
kml to open in the plugin.

Is there any way I can have a link load a kml directly in the plugin?
I know that a network link does this, but I don't want to use a view
based refresh. I want the user to click on a link and have the kml
load into the plugin. Any ideas?

thanks

Matt

On Oct 29, 8:20 am, fraser (Earth API Guru) wrote:
> HiMedlock,
> > properly. Any ideas?- Hide quoted text -
>
> - Show quoted text -

Kyle

unread,
Dec 18, 2009, 1:13:17 PM12/18/09
to KML Developer Support - Google Earth Plug-in
You'll probably want to look into the KML documentation, and not the
Google Earth documentation. I don't think that the data defined
within KML can talk to the Google Earth plugin directly (since it
wouldn't know if it's talking to the standalone application, the
plugin, or something else entirely).

From the KML documentation you could look into including a NetworkLink
tag in the KML of the balloon. (http://code.google.com/apis/kml/
documentation/kmlreference.html#networklink). I'm not sure if you can
then attach the clicking of a link to the execution of the
NetworkLink, but it's worth investigating.
Reply all
Reply to author
Forward
0 new messages