﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
21193	MapCSS: distance function	skyper	team	"This came up in #21172.

> [/ticket/21172/comment:6 taylor.smock]:
> > [/ticket/21172/comment:5 skyper]:
> > > Would it be possible to make this function available in mapcss? Atm, I think about validator like #17188 or checking that `footway=sidewalk` has a nearby main road, though, it might be useful for styles, too.
> >
> > Probably. How would it be used?
> >
> > Possible example:
> > {{{#!mapcss
> > node[bus=yes][public_transport=stop_position] !<some random symbol, e.g. □>(0, 5) node[highway=bus_stop] {
> >   throwError(""Bad public transport stop"");
> > }
> > }}}
> >
> > I can't think of a good way to just make a function, as I don't think our MapCSS implementation would allow us to parse recursive MapCSS, although I could be wrong (I haven't checked). Example:
> > {{{#!mapcss
> > node[bus=yes][public_transport=stop_position][distance(node[highway=bus_stop], 0, 5)] {
> >  throwError(""Bad public transport stop"");
> > }
> > }}}
> >
> > The function definition would look something like this:
> > {{{#!java
> > public List<IPrimitive> nearbyPrimitives(Predicate<OsmPrimitive> predicate, double minDistance, double maxDistance)
> > }}}"	enhancement	new	normal		Core mappaint			mapcss distance	taylor.smock
