public static MapRectangle GetBounds(CoordinateSystemIfc coordinateSystem, LatLonZoom center, Size size) { LatLon latlon = coordinateSystem.GetTranslationInLatLon(center, new Point(size.Width / 2, size.Height / 2)).latlon; LatLon latlon2 = coordinateSystem.GetTranslationInLatLon(center, new Point(-size.Width / 2, -size.Height / 2)).latlon; return(new MapRectangle(latlon, latlon2)); }
internal void DragVertex(Point diff, int draggedVertexIndex) { LatLon point = GetUserRegion().GetPoint(draggedVertexIndex); LatLonZoom center = new LatLonZoom(point.lat, point.lon, svdp.MapCenter().zoom); diff = new Point(-diff.X, -diff.Y); LatLonZoom translationInLatLon = csi.GetTranslationInLatLon(center, diff); GetUserRegion().UpdatePoint(draggedVertexIndex, translationInLatLon.latlon); Invalidate(); }
public static MapRectangle GetBounds(CoordinateSystemIfc coordinateSystem, LatLonZoom center, Size size) { LatLon latlon = coordinateSystem.GetTranslationInLatLon(center, new Point(size.Width / 2, size.Height / 2)).latlon; LatLon latlon2 = coordinateSystem.GetTranslationInLatLon(center, new Point(-size.Width / 2, -size.Height / 2)).latlon; return new MapRectangle(latlon, latlon2); }