public IKmlCamera focus(Hashtable coords) { IKmlCamera vw = ge.createCamera(""); vw.set((float)coords["lat"], (float)coords["lon"], 100.0, ge.ALTITUDE_RELATIVE_TO_GROUND, 0, 0, 0); return(vw); }
/// <summary> /// 지정한 위 경도로 이동 /// </summary> /// <param name="latitude"></param> /// <param name="longitude"></param> /// <param name="altitude"></param> /// <param name="speed"></param> public void MoveFlyTo(double latitude, double longitude, double altitude, double speed) { try { if (this.ge == null) { FileLogManager.GetInstance().WriteLog("[GEController] MoveFlyTo( GEPlugin is null. )"); throw new Exception("External Exception : GEPlugin is null."); } //맵 이동------------------------------------------시작 double prevFlyToSpeed = ge.getOptions().getFlyToSpeed(); ge.getOptions().setFlyToSpeed(speed); IKmlCamera camera = ge.getView().copyAsCamera(ge.ALTITUDE_RELATIVE_TO_GROUND); camera.setAltitude(altitude); camera.setLatitude(latitude); camera.setLongitude(longitude); camera.setHeading(360); ge.getView().setAbstractView(camera); ge.getOptions().setFlyToSpeed(prevFlyToSpeed); //맵 이동--------------------------------------------끝 } catch (Exception ex) { System.Console.WriteLine("MoveFlyTo Exception : " + ex.ToString()); FileLogManager.GetInstance().WriteLog("[GEController] MoveFlyTo( " + ex.ToString() + " )"); } }
public IKmlCamera zoom(String trip) { IKmlCamera vw = ge.createCamera(""); Hashtable coords = t_pool.getFocus(trip); vw.set((float)coords["lat"], (float)coords["lon"], 6000.0, ge.ALTITUDE_RELATIVE_TO_GROUND, 0, 0, 0); return(vw); }
public IKmlCamera allocate() { double lat = 0, lon = 0; IKmlObjectList days = ge.getFeatures().getChildNodes(); IKmlDocument day = (IKmlDocument)days.item(0); IKmlObjectList trips = day.getFeatures().getChildNodes(); for (int i = 0; i != (t_pool.getSize() / 2); i++) { IKmlFolder trip = t_pool.getByName("Trip_" + (i + 1)); IKmlObjectList points = trip.getFeatures().getChildNodes(); IKmlPlacemark point = (IKmlPlacemark)points.item(1); lon = (double)Module.getCoordinates(point)["lon"]; lat = (double)Module.getCoordinates(point)["lat"]; } //lon = lon / t_pool.getSize(); // lat = lat / t_pool.getSize(); IKmlCamera vw = ge.createCamera(""); vw.set(lat, lon, 25000.0, ge.ALTITUDE_RELATIVE_TO_GROUND, 0, 0, 0); return(vw); }
private void btTripExpand_Click(object sender, EventArgs e) { if (cblTrips.CheckedItems.Count != 1) { MessageBox.Show("You can only expend one trip at a time.", "Caution"); return; } else { t_pool.de_highlight(); view = ge.getView().copyAsCamera(1); tpi = cblTrips.CheckedIndices[0]; IKmlFolder trip = t_pool.getByName(cblTrips.CheckedItems[0].ToString()); IKmlObjectList points = trip.getFeatures().getChildNodes(); cblTrips.Items.Clear(); p_pool = new PointPool(trip); cblTrips.Items.AddRange(p_pool.getNames().ToArray()); tp_mode = 0; } }