Hi guys:
I write the fellowing code to test map' xrange and yrange using IDL 8.2.3.
With 'Stereographic' projection and disabling window' refresh,
the map's xrange and yrange equal [0,0]. But for other projection (like Lambert) or
enabled window' refresh, the map's xrange and yrange is OK. So why?
How can I solve this problem? Very thanks!
PRO test_map
w = window()
w.refresh, /disable
mp_bg = MAP('Stereographic', /current, $
CENTER_LONGITUDE=110, $
CENTER_LATITUDE=90)
OLDXRANGE = mp_bg.xrange
OLDYRANGE = mp_bg.yrange
print, OLDXRANGE, OLDYRANGE
mp_bound = MAPCONTINENTS(/COUNTRIES, COLOR='BLACK')
w.refresh
mp_bg.xrange = OLDXRANGE
mp_bg.yrange = OLDYRANGE
stop
w.erase
w.refresh, /disable
mp_bg = MAP('Lambert Conformal Conic', /current, $
STANDARD_PAR1=20, $
STANDARD_PAR2=30, $
limit=[0,60,50,130])
OLDXRANGE = mp_bg.xrange
OLDYRANGE = mp_bg.yrange
print, OLDXRANGE, OLDYRANGE
mp_bound = MAPCONTINENTS(/COUNTRIES, COLOR='BLACK')
w.refresh
mp_bg.xrange = OLDXRANGE
mp_bg.yrange = OLDYRANGE
END
|