private void _ViewModel_OnUpdateImage(ImageDisplayParameters parameter) { if (d3dImg.IsFrontBufferAvailable) { d3dImg.Lock(); _ImageWrapper.Draw(parameter); d3dImg.AddDirtyRect(new Int32Rect(0, 0, d3dImg.PixelWidth, d3dImg.PixelHeight)); d3dImg.Unlock(); } }
/// <summary> /// Performs an identify operation on a map service. /// </summary> /// <param name="geometry">The geometry to identify on.</param> /// <param name="tolerance">The distance in screen pixels from the specified geometry within which the identify should be performed.</param> /// <param name="mapExtent">The extent or bounding box of the map currently being viewed.</param> /// <param name="imageDisplay">The screen image display parameters (width, height and DPI) of the map being currently viewed.</param> /// <param name="callback">The callback function used to retrieve the results.</param> /// <param name="identifyoption">How to perform the identify.</param> /// <param name="layers">The layers to perform the identify operation on.</param> /// <param name="returnGeometry">If true, the resultset will include the geometries associated with each result.</param> /// <param name="layerDefs">Allows you to filter the features of individual layers in the exported map by specifying definition expressions for those layers.</param> public void IdentifyAsync( Geometry geometry, int tolerance, Geometry mapExtent, ImageDisplayParameters imageDisplay, System.Action <IdentifyResultCollection> callback, IdentifyLayersOption identifyoption = IdentifyLayersOption.All, int[] layers = null, bool returnGeometry = true, System.Collections.Generic.IDictionary <LayerTable, string> layerDefs = null) { throw new System.NotImplementedException(); }
/// <summary> /// Performs an identify operation on a map service. /// </summary> /// <param name="geometry">The geometry to identify on.</param> /// <param name="tolerance">The distance in screen pixels from the specified geometry within which the identify should be performed.</param> /// <param name="mapExtent">The extent or bounding box of the map currently being viewed.</param> /// <param name="imageDisplay">The screen image display parameters (width, height and DPI) of the map being currently viewed.</param> /// <param name="identifyoption">How to perform the identify.</param> /// <param name="layers">The layers to perform the identify operation on.</param> /// <param name="returnGeometry">If true, the resultset will include the geometries associated with each result.</param> /// <param name="layerDefs">Allows you to filter the features of individual layers in the exported map by specifying definition expressions for those layers.</param> /// <returns> /// A collection of <see cref="T:Geocrest.Model.ArcGIS.Tasks.IdentifyResult">IdentifyResult</see>s. /// </returns> public IdentifyResultCollection Identify( Geometry geometry, int tolerance, Geometry mapExtent, ImageDisplayParameters imageDisplay, IdentifyLayersOption identifyoption = IdentifyLayersOption.All, int[] layers = null, bool returnGeometry = true, System.Collections.Generic.IDictionary <LayerTable, string> layerDefs = null) { try { ValidateGeometry(geometry); ValidateGeometry(mapExtent); } catch (ArgumentNullException ex) { Throw.InvalidOperation("", x => new InvalidOperationException("Geometry object is invalid.", ex)); } IDictionary <string, object> inputs = new Dictionary <string, object>() { { "geometryType", geometry.GeometryType }, { "geometry", geometry }, { "sr", geometry.SpatialReference.WKID }, { "layers", GetLayers(identifyoption, layers) }, { "imageDisplay", string.Format("{0},{1},{2}", imageDisplay.Width.ToString(), imageDisplay.Height.ToString(), imageDisplay.DPI.ToString()) }, { "mapExtent", string.Format("{0},{1},{2},{3}", mapExtent.XMin.Value.ToString(), mapExtent.YMin.Value.ToString(), mapExtent.XMax.Value.ToString(), mapExtent.YMax.Value.ToString()) }, { "returnGeometry", returnGeometry.ToString() }, { "layerDefs", GetLayerDefs(layerDefs) }, { "tolerance", tolerance } }; Uri endpoint = GetUrl("identify", inputs); return(Geocrest.Model.RestHelper.HydrateObject <IdentifyResultCollection>(endpoint.ToString())); }