[Mapcss] Eval isn't really needed

Andrew O. Shadoura bugzilla at tut.by
Wed Jul 7 15:21:14 BST 2010


Hello.

On Wednesday 07 July 2010 16:36:56 Sebastian Spaeth wrote:
> > ^([a-z-]+)[ ]*:[ ]*("([^\x22]*)"|([0-9,.]+)|(#[,0-9a-fA-F]+)+)
(1)
> I don't like it :-). Using eval it is clear something dynamic is going
> to happen. What with the "2*2" bar? Is
>    name: 2*2
> a string ('2*2') or to be evaluated?
> What if I want to draw name tags for large features only?
>   name: eval("if ((area)>100) (tag(name)) ('')")

name: cond((area)>100,(tag(name)),"");
(2)

> Still that easy to identify? 

Sure. That regexp (1) will fail on this, so (2) is clearly "eval".

-- 
WBR, Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openstreetmap.org/pipermail/mapcss/attachments/20100707/4882af1a/attachment.pgp>


More information about the Mapcss mailing list