/// <summary> /// 跳转到某目标 /// </summary> /// <param name="name"></param> public void JumpToPlane(byte type, string elementName) { if (mapLogic == null) { return; } IMFLayer layer = mapLogic.GetLayer(GetModelLayerName(type)); if (layer == null) { return; } IMFElement element = layer.GetElement(elementName); if (element == null) { return; } IMFPicture model = element as IMFPicture; if (model == null) { return; } MapLngLat position = model.GetLngLat();; IMFToolBox toolBox = mapLogic.GetToolBox(); if (toolBox == null) { return; } toolBox.ZoomToPosition(position); }
// 归心 private void barButtonItem5_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { toolBox.ZoomToPosition(new MapLngLat(110, 23), 9); }