From: Andrea A. <and...@al...> - 2004-09-13 17:16:07
|
Alle 17:18, luned=EC 13 settembre 2004, Michael Bruns ha scritto: > Dear Developers, > > I want to make the size of a Graphic dependent on the scale. > > Is there a possibility to do this by an expression or anything else? > > > > Enclosed the code I use now: > > StyleBuilder.createGraphic(null, new Mark[]{arrowMark}, null, > sb.literalExpression(1), sb.literalExpression(10), > sb.attributeExpression("rotation")); > > > > In this Example every arrow is rendered in size 10, but I want (like > already described above) to draw it dependent on the scale. > > > > Solutions would be very welcome. No easy solution I fear... there is no support for what you're asking for at the moment. What you require needs quite a bit of extra work, since=20 we need to pass the information from the renderer (the only object that knows about the scale) to the Expression (that does the computation, at the moment based solely on the Feature attributes). It seems we would need to add a kind of "general" attribute storage, that holds the values of a few variables that are not contained in the features themselves, but in the "context" around them. We can design something togheter if you want, but I'm too busy to code it... would you like to contribute? Best regards Andrea Aime |