/// <summary> /// Called from javascripy when a kml/kmz file has been loaded /// </summary> /// <param name="kmlFeature">the loaded kml feature</param> public void LoadKmlCallBack(IKmlFeature kmlFeature) { this.OnKmlLoaded(kmlFeature, new GEEventArgs()); }
/// <summary> /// Protected method for raising the KmlLoaded event /// </summary> /// <param name="kmlFeature">The kmlFeature object</param> /// <param name="e">The Event arguments</param> protected virtual void OnKmlLoaded(IKmlFeature kmlFeature, GEEventArgs e) { if (this.KmlLoaded != null) { this.KmlLoaded(kmlFeature, e); } }
/// <summary> /// Look at the given feature /// </summary> /// <param name="ge">the plugin</param> /// <param name="feature">the feature to look at</param> public static void LookAt(IGEPlugin ge, IKmlFeature feature) { switch (feature.getType()) { case "KmlFolder": case "KmlDocument": case "KmlNetworkLink": if (feature.getAbstractView() != null) { ge.getView().setAbstractView(feature.getAbstractView()); } break; case "KmlPlacemark": if (feature.getAbstractView() != null) { ge.getView().setAbstractView(feature.getAbstractView()); } else { IKmlPlacemark placemark = (IKmlPlacemark)feature; LookAt(ge, placemark.getGeometry()); } break; default: break; } }