/// <summary> /// ViewExtents of Right Map Changes /// </summary> private void rightMap_ViewExtentsChanged(object sender, DotSpatial.Data.ExtentArgs e) { if (this.leftMap.ViewExtents != this.rightMap.ViewExtents) { this.leftMap.ViewExtents.SetValues(this.rightMap.ViewExtents.MinX, this.rightMap.ViewExtents.MinY, this.rightMap.ViewExtents.MaxX, this.rightMap.ViewExtents.MaxY); this.leftMap.Refresh(); } }
void MapFrame_ViewExtentsChanged(object sender, DotSpatial.Data.ExtentArgs e) { Debug.WriteLine(e.Extent.ToString()); if (this.mainMap != null && this.webMap != null) { double[] xy = new double[] { e.Extent.MinX, e.Extent.MinY, e.Extent.MaxX, e.Extent.MaxY }; double[] z = new double[] { 0, 0 }; DotSpatial.Projections.Reproject.ReprojectPoints(xy, z, this.mainMap.MapFrame.Projection, this.webMap.GetProjection(), 0, 2); this.basemapWin.SetExtents(new DotSpatial.Data.Extent(xy[0], xy[1], xy[2], xy[3])); } }