|
I am trying to use ASP.Net and a Web application to select a point from a dynamically created drawing and zoom to it. I listed my attempt below but it does not work. The problem lies in zooming in to the point. It seems it requires an INT X,Y and all I can manage to get is a Lat/Lon. There may be another way to go about this, if so please help. Thanks in Advance. Manifold.Interop.Query q = (Manifold.Interop.Query)mapServer.Document.ComponentSet["LoadTicketQuery"]; q.ParameterSet["pTicketNumber"].Value = (string)Request.QueryString["LT"]; q.Run(); Manifold.Interop.Drawing d = (Manifold.Interop.Drawing)mapServer.Document.ComponentSet["LoadTicketDrawing"]; d.SelectAll(); //Manifold.Interop.ObjectSet sel = d.Selection; //Manifold.Interop.GeomSet geom = d.Selection.GeomSet; //Manifold.Interop.Point pt = (Manifold.Interop.Point)geom.LastAdded; //mapServer.Center((int)pt.X, (int)pt.Y); Manifold.Interop.Drawing activeDrawing = d; Manifold.Interop.ObjectSet currentSelection = activeDrawing.Selection; if (currentSelection.Count > 0) { Manifold.Interop.Point geomPoint = currentSelection[0].get_Geom().Center; mapServer.Center((int)geomPoint.X, (int)geomPoint.Y); mapServer.ZoomIn( }
|