Reading ...
> I'm trying to work out whether updating the example will make it work
> with the changed JMapPane code, but I'm a bit lost in the new Layer
> code.
Okay - my goal was to make it exactly the same (but this time with a set class 
for each kind of layer - rather than a bunch of magic methods). 
>  In the example, the style of the single layer is updated when a new feature 
> selection is made:
> 
>  mapFrame.getMapContext().getLayer(0).setStyle(style);
>  mapFrame.getMapPane().repaint();
Okay. 
> I see that getLayer returns a deprecated DefaultMapLayer object.
> However, I can't update the example to use the new MapContent.layers()
> method because there doesn't seem to be a setStyle method (?)
Interesting; I would expect you are working with a FeatureLayer (so something 
like the following).

MapContent content = mapFrame.getMapContext();
if( content.layers().get(0) instanceof FeatureLayer ){
FeatureLayer selectionLayer = (FeatureLayer) content.layers().get(0);
selectLayer.setStyle( style );
}

Jody 
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to