public string GetStateInfo() { var env = model.GetEnvelpoe(); float h = Camera.main.orthographicSize * 2; float w = Camera.main.aspect * h; string result = string.Format( "窗口坐标: {0}; 地图坐标: {1}; " + "\n比例尺: {2}; 地图范围: {3}", // "\n窗口中心点: {2}对应的地图坐标: {3}" + // "\n窗口尺寸: ({4}, {5}); 地图范围: {6}" + // "\n比例尺: {7}; 摄像机Size: {8}" + // "\n当前呈现地图范围: {9}\n摄像机位置: {10}; 范围: (xmin: {11}, xmax: {12}, ymin: {13}, ymax: {14})", Input.mousePosition.ToString(), ViewToMap(Input.mousePosition.x, Input.mousePosition.y).ToString(), viewer.GetResolution(), viewer.GetCurrentMapRect().ToString() // viewer.GetSeeCenter().ToString(), ViewToMap(viewer.GetSeeCenter().x, viewer.GetSeeCenter().y).ToString(), // Screen.width, Screen.height, env.ToString(), // viewer.GetResolution(), Camera.main.orthographicSize, // viewer.GetCurrentMapRect().ToString(), // Camera.main.transform.position.ToString(), // Camera.main.transform.position.x - w * 0.5f, // Camera.main.transform.position.x + w * 0.5f, // Camera.main.transform.position.y - h * 0.5f, // Camera.main.transform.position.y + h * 0.5f ); return(result); }
public void Redraw(GisViewer v) { lineRenderer.Reset(); props.Radius = 1.5f * (float)v.GetResolution(); foreach (var item in lst) { var geo = item.fea.GetGeometryRef().Clone(); v.TransformGeometry2View(ref geo); DrawGeometry(geo); geo.Dispose(); } lineRenderer.Apply(); }