ThinkGeo.com    |     Documentation    |     Premium Support

Map legend not refreshed occasionally after legend formatting is changed

i noticed that occasionally there are two issues related to legend updates after some formats are changed:



My application requires changing legend formats dynamically or on the fly. After that, 

    


        
  1. sometime I have to change map scales to allow legend to be updated even map is changed

  2.     
  3. sometime when I go back to the scale when I changed map/legend formatting, I got the old legend.


My app is using ClassBreakStyle. A typical change the users often do is to change the number of breaks and break values. 



If the legend is a separate image created at the server side, I am wondering how it is cached and how the cache is invalidated? Possible when I go back to the previous scale or the map refreshes, the app is still thinking that the legend does not change and loads the cached image?



just some "Crazy" thinking here. 



Help!



Hi guangming, 
  
 Thanks for let us know your issue, could you please let me know your MVC edition? 
  
 If possible, please wait our coming release 9.0 and it looks we did many enhancement for MVC in this version. 
  
 And if your issue is hurry, please build a sample which can reproduce your issue, that will be more helpful. 
  
 Regards, 
  
 Don

it does happen always but occasionally. So some knowledge on how the legend image is created and cached at the server and client side will be very helpful to locate the issue.

Hi guangming, 
  
 In fact the cache is because the legend layer sent same request url and browser cache think it’s the same page, our sent request looks like this: 
  
 /adornment_GeoResource.axd?PageName=***&BBOX=-485.15247878992,-227.7936439496,499.22252121008,489.3938560504&WIDTH=700&HEIGHT=510& 
  
 And if you want to solve that, you need to pass some signature parameter in the request link, for simple, you can implement that like this: 
  
 Map1.getLayer(‘AdornmentOverlay’).redraw(true) 
  
 Which should sent another request with a new parameter time and will force refresh this layer. 
  
 Wish that’s helpful. 
  
 Regards, 
  
 Don

we noticed that that is true (adding a new parameter time to the request url) for version 8. 
  
 Is this not available in version 7 or lower? 
  
 Thanks,

Hi Guangming, 
  
 I am not sure when we modify it, but I think in lower version, we shouldn’t have this parameter. 
  
 Regards, 
  
 Don

a little confused: do you mean that there is not parameter (time) in lower version or current version (such as v8)?

Hi guangming, 
  
 I cannot find related information about which version we introduce this parameter. But for V8 we have it, for V7 we need test for prove that, for V6 it shouldn’t contains this. 
  
 Regards, 
  
 Don