static public void calc_latlong2_area_from_center(map_area_class area, latlong_class center, double zoom) { map_pixel_class map_pixel_class = latlong_to_pixel2(area.lower_right, zoom); map_pixel_class map_pixel_class2 = latlong_to_pixel2(center, zoom); map_pixel_class map_pixel_class3 = latlong_to_pixel2(area.center, zoom); map_pixel_class map_pixel_class4 = latlong_to_pixel2(area.upper_left, zoom); map_pixel_class map_pixel_class5 = new map_pixel_class(); map_pixel_class5.x = map_pixel_class2.x - map_pixel_class.x; map_pixel_class5.y = map_pixel_class2.y - map_pixel_class.y; map_pixel_class3.x += map_pixel_class5.x; map_pixel_class3.y += map_pixel_class5.y; map_pixel_class4.x += map_pixel_class5.x; map_pixel_class4.y += map_pixel_class5.y; area.lower_right = center; area.center = pixel_to_latlong2(map_pixel_class3, zoom); area.upper_left = pixel_to_latlong2(map_pixel_class4, zoom); }
public override void calc_latlong_area_from_center(map_area_class area, latlong_class center, double zoom, Vector2 resolution) { map_pixel_class map_pixel_class = this.latlong_to_pixel2(area.center, zoom); map_pixel_class map_pixel_class2 = this.latlong_to_pixel2(center, zoom); map_pixel_class map_pixel_class3 = this.latlong_to_pixel2(area.upper_left, zoom); map_pixel_class map_pixel_class4 = this.latlong_to_pixel2(area.lower_right, zoom); map_pixel_class map_pixel_class5 = new map_pixel_class(); map_pixel_class5.x = map_pixel_class2.x - map_pixel_class.x; map_pixel_class5.y = map_pixel_class2.y - map_pixel_class.y; map_pixel_class3.x += map_pixel_class5.x; map_pixel_class3.y += map_pixel_class5.y; map_pixel_class4.x = map_pixel_class3.x + (double)resolution.x; map_pixel_class4.y = map_pixel_class3.y + (double)resolution.y; area.upper_left = this.pixel_to_latlong2(map_pixel_class3, zoom); area.lower_right = this.pixel_to_latlong2(map_pixel_class4, zoom); area.center = center; }