SketchEditor ignores points when adding them too fast

155
2
08-13-2018 02:15 AM
JonasHashagen
New Contributor II

I've noticed that the SketchEditor does sometimes skip/ignore points that should be added when clicking too fast (1-3 points per seconds on my machine) on the MapView. I'd suspected our usage of the SketchEditor to cause this problem, but it the issue can be reproduced using the SketchEditor sample which indicates to me that this is a general problem with the SketchEditor.

0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor

Thank you for this feedback. I tried to simplify the repro code and what I'm seeing is if the tap/click was done in quick succession to result in a double-tap zoom or had a flick to cause a pan, the point feature is not created. This may be because it did not trigger a tapped event after all. I tried enabling only one of two tests at a time to check.

What platform are you using? Are you observing the map to zoom or pan when graphic is not added?

MyMapView.Map = new Map(Basemap.CreateTopographic());
MyMapView.GraphicsOverlays.Add(new GraphicsOverlay() { Renderer = new SimpleRenderer(new SimpleMarkerSymbol()) });
MyMapView.SpatialReferenceChanged += async (s, e) =>
  {
      var overlay = MyMapView.GraphicsOverlays.FirstOrDefault();
      // Test #1: SketchEditor
      while (true)
      {
          var g = await MyMapView.SketchEditor.StartAsync(SketchCreationMode.Point, false);
          overlay.Graphics.Add(new Graphic(g));
      }
  };

MyMapView.GeoViewTapped += (s, e) =>
  {
      // Test #2: GeoViewTapped event
      // var overlay = MyMapView.GraphicsOverlays.FirstOrDefault();
      // overlay.Graphics.Add(new Graphic(e.Location));
  };

I don't see this when I disable zoom/pan.

MyMapView.InteractionOptions = new MapViewInteractionOptions() { IsZoomEnabled = false, IsPanEnabled = false };
JonasHashagen
New Contributor II

Thanks for your reply! I just realized that my initial post was not precise enough and I accidentally missed some important information...

Environment:

  • Windows 7
  • Esri.ArcGISRuntime SDK for .NET 100.3.0

Precondition:

  • Disable zoom/pan in SketchEditor sample.

Reproduction steps:

  • Start the sample
  • Select polyline or polygon as geometry
  • Start sketching with fast clicking for adding points

Further information:

  • I did register to MapView.GeoViewDoubleTapped which is not getting called during my clicking
  • I did register to MapView.GeoViewTapped. It gets ignored for some clicks
  • I did register to MapView.PreviewMouseLeftButtonDown. It gets called for all clicks.
  • I did register to MapView.PreviewMouseLeftButtonUp. It gets called for all clicks.
0 Kudos