[Users] VectorLegend.js

gbrun gbrun at myopera.com
Thu Oct 13 13:07:44 CEST 2011


Hi Hugo,

My question would probably be surprising for you! Do your LegendPanel use  
a "border" layout shared with an other panel (a MapPanel precisely? I got  
a similar bug: this one appeared when I collapsed/expanded the LegendPanel  
after removing a layer.

I'm not sure your problem is related to this one, but perhaps?

Geoffrey



Le Thu, 13 Oct 2011 12:44:27 +0200, Hugo <hfpmartins at gmail.com> a écrit:

> Hello all,
>
> I'm facing a small but annoying problem with vector legends. I'm using  
> JSTS
> (which i think it is an awesome contribution for geoprocessing  
> operations on
> the client side) to compute buffers. So the user defines the parameters  
> to
> compute a buffer and a new vector layer is added with the result. Untill  
> now
> everything is fine, and GeoExt.LegendPanel shows the legend for this  
> layer.
> In the app, the user has also the possibility to select several layers  
> and
> completely remove them from the map. It is exactly here that the problem
> arises. After removing a vector layer from the map i start to get an  
> error
> related with vectorlegend.js. From that point onwards, everytime i make a
> zoom in the map i get the following error:
>
> this.layer is null (on line 256 of vectorlegend.js:
> this.layer.map.getScale())
>
> This only happens after removing vector layers from the map. So i  
> thought i
> had to manually remove the layer from the legendpanel but, as expected,  
> the
> layerstore  of the legendpanel is synchronized with the mapPanel  
> layerstore
> and, therefore, the layer is no longer present at both stores.
>
> So, what might be the issue happening here?
>
> Regards,
> Hugo
>
>


-- 
-- 
Geoffrey BRUN

Étudiant en master SIGMA
Stagiaire au PNR du Haut-Languedoc

Hameau de Brassac
Saint-Pons de Thomières
+33 (0) 6 77 74 44 16


More information about the Users mailing list