Efficiently Move Polylines

2118
13
06-10-2018 03:32 PM
ScottBrady1
New Contributor

Hi,

I am aware that the MapPoint object has the MoveTo function that allows one to efficiently move points from one location to another without re-creating the object. 

Is there a method or technique that facilitates moving polylines between two locations on each timer tick without incurring the overhead of creating new Polyline objects.

Kind Regards

Scott

0 Kudos
13 Replies
ScottBrady2
New Contributor

Hi Morten,

Unfortunately our application cannot be migrated to UWP as that would require a significant amount of rework with respect to the other modules. 

We reviewed the 100 series and came to the conclusion that at this stage it does not support all of our requirements.

That said, we will review the 100 series and implement when more fully featured.

Kind Regards

Scott Brady

Application Developer

CISTECH SOLUTIONS

0 Kudos
dotMorten_esri
Esri Notable Contributor

With WPF I'm still curious how that conclusion came to be, and if you possibly could share an example of how it falls short, so perhaps I could provide pointers how to improve it? There's ways to move polylines efficiently and ways to do it very inefficiently. My streaming-service-layer sample uses some best practices to frequently update graphics in a special re-used render-thread pulse (regardless of it only updating points).

Because the vertices of a polyline changes the vertex buffers needed on the graphics card, there really isn't any way for any API to efficiently "move" polylines around the same way that points can be done, so yes there's going to be an additional overhead, but we have also spent a lot of times optimizing that.

0 Kudos
ScottBrady2
New Contributor

Apologies for not replying sooner.

Due to the nature of my project and its I am not permitted to share the code.

I have managed to implement lines but I am unsure as to whether I am doing it efficiently or not.

Would it be possible to have a look at your sample application such that I can compare.

I am using 10.2.7

Kind Regards

Scott

0 Kudos
dotMorten_esri
Esri Notable Contributor

I do not have a sample for 10.2.x. The sample I have I already shared above for 100.x, which have the framework for doing efficient geometry updates. It's only updating points, but is easily extensible to polyline too without changing the actual framework.

0 Kudos