Beispiel #1
0
        /// <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;
            }
        }