Refresh map layer

981
9
06-02-2013 12:45 AM
Labels (1)
teamIgal
New Contributor III
Hello,

I have 2 MapControls in my program, both are showing the same layers from the same MPK.
When the user draws a point in map A, then map B is not showing that point, until i move the map with the mouse.

I set DisableClientCaching to true for that layer, and also called Refresh() and Update() methods - but nothing seems to be really refreshing that layer.
I even tryed to change the extent and zoom back and forth in the code behind, to make that point appear on the map - but still nothing worked.

Any suggestions?

Thanks,
Team Igal
0 Kudos
9 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

Can you post the code which demonstrates the issue?

Cheers

Mike
0 Kudos
teamIgal
New Contributor III
Hi,

Can you post the code which demonstrates the issue?

Cheers

Mike


Hello Mike,

I am not sure what you want me to post.
I just have some event handler, that i need it to refresh the feature layer in a map. and nothing i am trying to do doesn't seem
to refresh it.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Actually, maybe the code isn't necessary - have you set the FeatureLayer.Mode to OnDemand? (the default is Snapshot - i.e. everything up to the first 1000, or whatever the service limit is).

Cheers

Mike
0 Kudos
teamIgal
New Contributor III
Hi,

Actually, maybe the code isn't necessary - have you set the FeatureLayer.Mode to OnDemand? (the default is Snapshot - i.e. everything up to the first 1000, or whatever the service limit is).

Cheers

Mike


Hi Mike,

Yes, the layers are set to OnDemand.
(I was even trying to change is to Snapshot - just to see if it changes something - but it doesn't)
0 Kudos
AnttiKajanus1
Occasional Contributor III
Have you saved the graphic into layer and verified that it is found from the service?

You can easily check that from the REST endpoint with query tool.
0 Kudos
teamIgal
New Contributor III
Have you saved the graphic into layer and verified that it is found from the service?

You can easily check that from the REST endpoint with query tool.


The graphic is saved into the layer - because i can see it in the original map that i am drawing the graphic in.
and after panning a bit in the second layer i can see that graphic too.
0 Kudos
teamIgal
New Contributor III
Hello,

I am still looking for a solution for my problem.

Does anyone might have an idea what the problem is?

Thanks,
Team Igal
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Are you able to share you code? It would be useful to see exactly how your app is written.

Cheers

Mike
0 Kudos
teamIgal
New Contributor III
Hi,

Are you able to share you code? It would be useful to see exactly how your app is written.

Cheers

Mike


Hello Mike,

unfortunately it's not possible for me to share out code.
But i am not doing anything special - just looking for a way to upadate the layer from changes in the GDB that are not being updated in any way other then mooving the map with my mouse.
you could try this if you change something in the GDB, and than try to see the changes in the map.

Thanks,
Igal Team
0 Kudos