Exemplo n.º 1
0
        /// <summary>
        /// Create look at mode
        /// </summary>
        public void CreateLookAt()
        {
            KmlLookAtCoClass lookAt = ge.createLookAt("");

            lookAt.set(Latitude, Longitude, Altitude, ge.ALTITUDE_RELATIVE_TO_GROUND, 0, 0, Range);
            ge.getView().setAbstractView(lookAt);

            ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, 1);


            //create a point
            KmlPointCoClass point = ge.createPoint("");

            point.setLatitude(lookAt.getLatitude());
            point.setLongitude(lookAt.getLongitude());

            //create a placemark
            KmlPlacemarkCoClass placemark = ge.createPlacemark("");

            placemark.setName("Start Position");
            placemark.setGeometry(point);

            ge.getFeatures().appendChild(placemark);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Look at the given coordinates
 /// </summary>
 /// <param name="ge">the plugin</param>
 /// <param name="latitude">latitude in decimal degrees</param>
 /// <param name="longitude">longitude in decimal degrees</param>
 public static void LookAt(IGEPlugin ge, double latitude, double longitude)
 {
     IKmlLookAt lookat = ge.createLookAt(String.Empty);
     lookat.set(
         latitude,
         longitude,
         100,
         ge.ALTITUDE_RELATIVE_TO_GROUND,
         0,
         0,
         1000);
     ge.getView().setAbstractView(lookat);
 }