Adding and removing then adding networkLink causes Error calling method on NPObject!

45 views
Skip to first unread message

markr

unread,
Nov 8, 2009, 12:06:40 AM11/8/09
to KML Developer Support - Google Earth Plug-in
I am trying to add and remove a network link.
I can add one with an id and remove it by searching for that id and
removing it.
But...when I try to add it again I get:
Error calling method on NPObject!

This is how I am removing the link:
child.setVisibility(false);
oldchild = ge.getFeatures().removeChild(child);
oldchild.release();

I get the error/exception above on: networkLink = ge.createNetworkLink
(id);

Ideas?

Thanks,
Mark

Andy4834

unread,
Nov 8, 2009, 11:08:41 AM11/8/09
to KML Developer Support - Google Earth Plug-in
Mark
Are you using the same id - I'm not sure but it may be that GEPlugin
still has the id cached even though you've done a removeChild the id
is still known.
Regards
Andy

Lucas Vickers

unread,
Nov 8, 2009, 2:19:09 PM11/8/09
to KML Developer Support - Google Earth Plug-in
I had a similar issue and changing the name of the child fixed the
issue.

markr

unread,
Dec 9, 2009, 3:17:48 PM12/9/09
to KML Developer Support - Google Earth Plug-in
That worked!
Thanks guys.
> > > Mark- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages