Select to view content in your preferred language

overviewmap location indicator disappears

947
4
01-25-2011 10:01 AM
ThaoNguyen
Emerging Contributor
My scenario:
- I have 2 tab views, each with an esri map.
- I have only 1 overview map section.  Every time I switch to a map tab, the overview map is updated with the map of that tab and other info are updated as below:

[INDENT]
overviewMap.Map = MainMap;
overviewMapLayer = overviewMap.Layer as ArcGISDynamicMapServiceLayer;
overviewMapLayer.Url = baseMapLayer.Url;
overviewMap.Map.Extent = MainMap.Extent;
overviewMap.UpdateLayout();[/INDENT]

overviewMap is OverviewMap instance.
MainMap is my map instance.

- I can drill down to an area on the map.  When drilling down, I update my main map with the next layer and also update the overview map as above.

Problem:
After drilling down, I switch to another map tab view, the location indicator (red square in the attached image) disappears.  I don't know what causes that.
One way to fix this is I pan the overview map to somewhere (programmatically), BUT I don't want to do so unless I just do the panTo to the same place so that it doesn't move, but then I don't know how to get the indicator location.
Is there anything I'm missing here and what workaround I can do?

Please help!
0 Kudos
4 Replies
dotMorten_esri
Esri Notable Contributor
Could you share a simple sample that reproduces the error?
0 Kudos
ThaoNguyen
Emerging Contributor
Could you share a simple sample that reproduces the error?


Hmm, I don't know if I have time to create a simple sample for this :(.
I also found out that after switching to different map views and when the indicator disaapears, if I resize the window or I just zoom in/out or pan the main map, the overview map indicator will reappear. Looks like to me the painting of the overview map was not triggered or something like that which causes the indicator to disappear.  I tried to find if there is a Refresh() method for OverviewMap, but couldn't find one.  I tried UpdateLayout(), but that didn't help.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I was able to reproduce the issue. Looks like a bug.

You'll try to fix it for the next version.

Thanks for reporting this.
0 Kudos
ThaoNguyen
Emerging Contributor
I was able to reproduce the issue. Looks like a bug.

You'll try to fix it for the next version.

Thanks for reporting this.


Did you mean "We'll try to fix it"? I don't think I can fix it :).
I'm glad that you were able to recreate.  Is there a way for me to get the indicator location x,y values??  I want to have a workaround for this by moving the overview map a little bit so that it triggers the overviewmap painting.
0 Kudos