Refresh Feature layer problem on adding new feature continuously

1332
3
Jump to solution
08-02-2013 03:27 AM
Santosh_Pavan_KumarNukala
Deactivated User
Hi,

I am developing a stand alone application using C# Arcobjects 10.1 SDK.
I have a requirement to plot point features continuously as and when data is populated into my Message Queue( 1 message for 1 point feature). I keep getting some hundreds of points and some of them at the same time, hence i need to plot them as soon as i get them without much delay. I am able to create new features in a feature class and create a feature layer to display.
Upon creation of the first feature, I am adding a feature layer to map and from next time i am refreshing the feature layer so that new features can be seen. The problem is i need to refresh the feature layer every time i add a new feature and hence when i plot thousands of symbols it flickers continuously. I tried all the options in ActiveView.PartialRefresh() also specifying the feature layer as its argument, when i do so.. I can only see the first point and the system hangs for some time and after all the points are plotted the system comes out of hang and when i do a refresh operation the feature layer is visible. Using Refresh() continuously flickers until all are plotted.

I earlier plotted points on Graphic layer and points were being plotted without the need to refresh the map, but I had to move to Feature layer and I am facing this refresh problem in order to see the newly add features. Also to mention I am not aware of how many points i need to plot, I need to continuously plot as and when i get the information into my message Q.  Is there a way to see the features as soon as they are created on the feature layer without much refreshing.

This might be a common problem which many of us might have faced. Please help on this.. need to address this on priority basis.

Thanks and Regards,
Santosh Pavan Kumar
0 Kudos
1 Solution

Accepted Solutions
Santosh_Pavan_KumarNukala
Deactivated User
Most people choose the GraphicsTracker for this, but some people have reported they experience memory management issues in the .NET API.

My question to you is why do you want to create features in a FeatureLayer as you are getting the messages?  Can't you create the FeatureLayer later on?



What do you mean by "I had to move the Feature Layer"?




Thanks for the reply..
I need to plot the locations, as and when there is an entry into message queue without any time delay. I earlier thought in your lines, store all the info from messages in some list and then create the feature layer once with all that info. But I am not sure of how many messages i am going to get, it can one, ten, or even hundreds some times. If I say im going to store some fixed number "n" messages in a list and then create feature layer and i get a number less than that .. i cannot keep waiting till my messages reach that fixed number. The messages randomly come , so i thought creating feature as and when the i get the message is ideal. Hope my explanation makes sense.

"I had to move to Feature Layer" meant earlier i had plotted these symbols as pure graphic elements in graphic layer and not in feature layer.Later I needed to store some information pertaining to those symbols in geodatabase cz of which i moved to plotting them as features in feature class.

I had anyhow solved this issue, while refreshing using ActiveView.PartialRefresh().. the third argument accepts an IEnvelope parameter.. I had mentioned the point symbol feature's IEnvelope as the third argument because of which only the location part gets refreshed instead of the whole Layer.. hence the newly created feature is displayed as and when it is created in the feature class..


Thanks,
Pavan

View solution in original post

0 Kudos
3 Replies
Santosh_Pavan_KumarNukala
Deactivated User
Here http://forums.esri.com/Thread.asp?c=9&f=1193&t=121180 is a similar issue which was left unanswered 😞
0 Kudos
LeoDonahue
Deactivated User
Most people choose the GraphicsTracker for this, but some people have reported they experience memory management issues in the .NET API.

My question to you is why do you want to create features in a FeatureLayer as you are getting the messages?  Can't you create the FeatureLayer later on?

I earlier plotted points on Graphic layer and points were being plotted  without the need to refresh the map, but I had to move to Feature layer  and I am facing this refresh problem in order to see the newly add  features


What do you mean by "I had to move the Feature Layer"?
0 Kudos
Santosh_Pavan_KumarNukala
Deactivated User
Most people choose the GraphicsTracker for this, but some people have reported they experience memory management issues in the .NET API.

My question to you is why do you want to create features in a FeatureLayer as you are getting the messages?  Can't you create the FeatureLayer later on?



What do you mean by "I had to move the Feature Layer"?




Thanks for the reply..
I need to plot the locations, as and when there is an entry into message queue without any time delay. I earlier thought in your lines, store all the info from messages in some list and then create the feature layer once with all that info. But I am not sure of how many messages i am going to get, it can one, ten, or even hundreds some times. If I say im going to store some fixed number "n" messages in a list and then create feature layer and i get a number less than that .. i cannot keep waiting till my messages reach that fixed number. The messages randomly come , so i thought creating feature as and when the i get the message is ideal. Hope my explanation makes sense.

"I had to move to Feature Layer" meant earlier i had plotted these symbols as pure graphic elements in graphic layer and not in feature layer.Later I needed to store some information pertaining to those symbols in geodatabase cz of which i moved to plotting them as features in feature class.

I had anyhow solved this issue, while refreshing using ActiveView.PartialRefresh().. the third argument accepts an IEnvelope parameter.. I had mentioned the point symbol feature's IEnvelope as the third argument because of which only the location part gets refreshed instead of the whole Layer.. hence the newly created feature is displayed as and when it is created in the feature class..


Thanks,
Pavan
0 Kudos