layer label disappears from display window

Errors and unexpected results
Post Reply
User avatar
hproe
Posts: 504
Joined: Sat Nov 27, 2010 3:46 pm

layer label disappears from display window

Post by hproe »

When manipulating (e.g. changing projection, resizing window) the display of satellite imagery the layer labels may disappear suddenly. Up to now I have not been able to produce the disappearance in a "controlled" way. There appears to be no way to make them reappear, i.e you have to kill and restart the session to get them back (until they disappear again. Very annoying. It happens under W7 and Linux, both 64-bit.

HP
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: layer label disappears from display window

Post by joleenf »

HP,

It has been a while since the layer label has disappeared for me, so I am not able to test this. Here is a possible work around to try. Open a Jython shell and use the blue commands:

mydisplays=allDisplays() #if you have more than one display, this grabs all of them.
for m in mydisplays: #just to see what you have, print in a loop
print m

My result was a list of 3 items because I had three tabs in my display:
View:(view_1273685291356_0_487574388449474_93 [])
View:(view_1297535717769_0_2925608773852407_13 [])
View:(view_1297535717769_0_2925608773852407_15 [])

bground=mydisplays[0].getControls() # get the controls for the first tab
print bground # print what is in it display
[Default Background Maps] #...my first tab had nothing but a map in the display

bground2=mydisplays[1].getControls() #my next display tab
print bground2

[Default Background Maps, Image Display] #the layer label will be controlled with the Image Display control

bground2[1].setShowInDisplayList(1) # this turns the layer label back on (turn off with setShowInDisplayList(0)

Hopefully this all makes sense and works in a case when the layer label spontaneously disappears. I have not been able to reproduce that for a while so I have not had a chance to test this method. I know these commands work for turning the layer labels on and off when all is working normally.

The commands without all the extra stuff in it...
mydisplays=allDisplays()
bground=mydisplays[0].getControls()
bground2=mydisplays[1].getControls()
print bground2
bground2[1].setShowInDisplayList(1)

Obviously, this is only a work around and it would be really nice to be able to rely on the layer label remaining visible.
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: layer label disappears from display window

Post by joleenf »

HP,

I realized after giving it some thought, the above method is just the scripting way of activating and deactivating "Show in Layer List" under the Layer Controls>Edit>Properties. If it does not work through the GUI, I have a feeling this will fail as well. Another method, though not ideal, it to save the bundle without the layer label and then in a script, load the bundle and add a layer label with the writeImage command...

a=loadBundle("myhomedirectory/mybundle.mcvz")
pause()
writeImage("/myhomedirectory/myimage.jpg",\
overlay text=6.5 um channel anchor=UM place=UM,0,60 color=black fontsize=12 fontface=Arial")

Hope one of these two methods can help in the short term, until the problem is fixed.
User avatar
beckys
Posts: 172
Joined: Wed Jan 07, 2009 7:50 pm

Re: layer label disappears from display window

Post by beckys »

Hi, HP -

We've seen this behavior as well, and I agree it is annoying.

We are in the beginning stages of looking into a new way of drawing all of the non-navigated text to the display window, which will hopefully eliminate these kinds of problems. It's a big change that will no doubt take some time to implement.

That said, there is a very strange way to make your labels reappear that works for me when this occurs. If you Edit the User Preferences for the Display Window and change the font size or the color, it brings back the labels. Obviously, this is not ideal, but sometimes it is better than restarting your session.

Sorry the "fix" isn't the best, but hopefully we'll be able to fix this one "the right way."

- Becky
Post Reply