public void ChangedMapCenter(ObjectBounds Bounds, MainControl mainControl) { if (mainControl.mapControl1.CurrentMapBox.Map != null) { // if (Bounds.LeftTopLatitude > 0 && Bounds.RightButtomLatitude > 0 && Bounds.LeftTopLongitude > 0 && Bounds.RightButtomLongitude > 0) // { Envelope envelop = new Envelope(Bounds.LeftTopLatitude, Bounds.RightButtomLatitude, Bounds.LeftTopLongitude, Bounds.RightButtomLongitude); mainControl.mapControl1.CurrentMapBox.Map.ZoomToBox(envelop); mainControl.mapControl1.CurrentMapBox.Refresh(); //} } }
public void ChangedMapCenter(ObjectBounds Bounds,MainControl mainControl) { if (mainControl.mapControl1.CurrentMapBox.Map != null) { // if (Bounds.LeftTopLatitude > 0 && Bounds.RightButtomLatitude > 0 && Bounds.LeftTopLongitude > 0 && Bounds.RightButtomLongitude > 0) // { Envelope envelop = new Envelope(Bounds.LeftTopLatitude, Bounds.RightButtomLatitude, Bounds.LeftTopLongitude, Bounds.RightButtomLongitude); mainControl.mapControl1.CurrentMapBox.Map.ZoomToBox(envelop); mainControl.mapControl1.CurrentMapBox.Refresh(); //} } }