How to flash Geometry such as MapPoint, Multipoint, polyline, etc. in ArcGIS Pro SDK .NET ?
I don't mean flash features or selected features.
For example Flash the below MapPoint which is not belong to any featureclass.
MapPoint Mp=New MapPointBuilder.CreateMapPoint(1,2,3,4);
Thanks
Solved! Go to Solution.
You can pass in a collection of OIDs to the FlashFeature method. Here is the method in the API Ref guide:
Hello
What I meant was how I can flash a geometry on the display
Let me simplify my question.
Suppose we create a simple MapPoint, see below code
MapPoint Mp=New MapPointBuilder.CreateMapPoint(1,2,3,4);
How can I flash this point. it is not a feature and it is not belong to any featureclass.
Thanks
On Tuesday, December 3, 2019, 04:50:05 p.m. CST,
Hi,
There is no built in functionality to flash graphic overlays. But you could write your own to simulate flashing - by adding/removing the graphic on a timer for example.
Thanks
Uma
Hi
What I understood from your response is that to create an overlay graphic at the location of the Geometry(i.e. MapPoint) and after displaying that removing the graphic from MapView, right?
In ArcObjects there is a snippet that can Flash Geometry on the display.
Thanks
Hi Behroz,
You are correct. That is exactly what I meant.
Thanks!
Uma
Hi Uma
Is their any easy way to plash graphics in 2.6
I tried to play with add and remove element, change symbol and Sleep in between.
It looks really bad.
Thanks
Mody
Remove / Add overlay didn't work for me either, it seems to be too asynchronous (random) when the map is actually refreshed. The best way I found to do this (even so I didn't have to flash my geometry, instead I just moved it) was to use UpdateOverlay with a symbol color that is opposite on the color wheel.
Thanks for the hint Wolf. This works for me (where Graphics is a Dictionary<IMyObjectWithGeometry, IDisposable>):
private void FlashGraphic(IMyObjectWithGeometry tag, short flashCount)
{
QueuedTask.Run(() =>
{
for (int i = 0; i < flashCount; i++)
{
MapView.Active.UpdateOverlay(Graphics[tag], tag.Geometry, _invertedSymbol);
Thread.Sleep(200);
MapView.Active.UpdateOverlay(Graphics[tag], tag.Geometry, _originalSymbol);
Thread.Sleep(200);
}
});
}
It does flash the geometry, however it does not have the same animation effect as flashing a feature. Would be nice to have a built-in function for flashing geometries on the map.