[Mapcss] Bug in the mapcss introduction slieds of Maskim?
Thomas Davie
tom.davie at gmail.com
Fri Jan 27 13:07:03 GMT 2012
The problem with implicit ordering in the style is things like this:
way[waterway]
{
colour: blue;
width: 5pt;
}
way[highway]
{
colour: red;
width: 11pt;
}
way[waterway="river"]
{
text: name;
}
Which gets rendered first. Secondly, the other issue is that it requires you to tie the renderer and styler more closely together – suddenly the renderer needs to care about when the rule(s) for a particular object were matched in the stylesheet, rather than just the computed style.
I'd much rather see the MapCSS workflow look like
StyledObject = (Object, ComputedStyle)
[Object] --styler-> [StyledObject] --renderer-> PrettyPicture
Bob
if (*ra4 != 0xffc78948) { return false; }
On 27 Jan 2012, at 12:43, Peter Wendorff wrote:
> Hi.
> If you are right (and yes, that's possible, I can't prove the opposite), I think this should be stated clearly in the documentation.
>
> On the other hand I'm not sure if this variant is really the best idea.
> It leads to verbose, hard do maintain mapcss stylesheets if the developer wants to set up a fixed rendering order, and usually at maps that's the case for most rules, I think.
>
> I would change it in the wiki, but I would like to get more comments on that from the list, so I don't change it now.
>
> regards (and thanks for the answer)
>
> Peter
>
> Am 27.01.2012 13:34, schrieb Thomas Davie:
>>
>> At least in my interpretation of MapCSS, the behaviour when two objects are defined to have the same z-index is undefined. The order of rendering here should (in my book) be effectively random.
>>
>> Bob
>> if (*ra4 != 0xffc78948) { return false; }
>>
>> On 27 Jan 2012, at 12:24, Peter Wendorff wrote:
>>
>>> Hi.
>>> I have to give a short introduction to someone who should implement a mapcss renderer and looked into the docs availlable for that.
>>> For that I especially looked into the sotm-eu presentation done by Maskim [1], and I fear there is a small bug on slide 7 (and the following pages).
>>>
>>> The stylesheet presented does not contain any z-index or layer definitions. To quote the slide, it's defined as:
>>>
>>> line[highway] {
>>> color: orange;
>>> width: 11;
>>> }
>>>
>>> area[building] {
>>> fill-color: gray;
>>> }
>>>
>>> line[waterway] {
>>> color: blue;
>>> width:3;
>>> }
>>>
>>> The image presented nearby shows a similar image, but the highway is rendered on top of the river.
>>> Shouldn't that be the other way around (according to the mapcss code, not to "good maps")?
>>>
>>> regards
>>> Peter
>>>
>>> [1] http://sotm-eu.org/slides/10_MaksimGurtovenko_MapCSS.pdf
>>>
>>> _______________________________________________
>>> Mapcss mailing list
>>> Mapcss at openstreetmap.org
>>> http://lists.openstreetmap.org/listinfo/mapcss
>>
>>
>>
>> _______________________________________________
>> Mapcss mailing list
>> Mapcss at openstreetmap.org
>> http://lists.openstreetmap.org/listinfo/mapcss
>
> _______________________________________________
> Mapcss mailing list
> Mapcss at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/mapcss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/mapcss/attachments/20120127/68533720/attachment-0001.html>
More information about the Mapcss
mailing list