[Merkaartor] Editing Styles

James Ewen ve6srv at gmail.com
Thu Sep 23 05:36:04 BST 2010


On Tue, Sep 21, 2010 at 12:57 AM, Chris Browet <cbro at semperpax.com> wrote:

> Did you actually saved your changed style? There is no "autosave", so a
> modified style must be explicitly saved.

Yup, I saved it.

> 2 solutions to use a modified style:
> 1) load it at each session
> 2) save it in the folder specified in "preferences-style-custom style
> directory"; it will then appear in the "Tool-Styles" menu and in the "Style"
> dock, where you can select it, and it will stick between sessions.

Aha, putting it into the custom style directory makes it so you can
find and use it without having to load it each time. Got that working
nicely.

> On Mon, Sep 20, 2010 at 02:17, James Ewen <ve6srv at gmail.com> wrote:
>
>> I want to modify colours, or add new rules, or create a whole new
>> style, and I can't seem to be able to do any of those.
>>
>> I save a style but I can't seem to load it back in. I can't seem to
>> change colours for anything either. I tried adding a simple rule to
>> none.mas, but it seems to disappear all the time.

Okay, so that takes care of creating a new style, and I can add and
remove rules at will. I just can't make many modifications to the
rules.

I can change the tag selection criteria, and set the max and min
visibility rules.

Under Background, I can check the Draw with color, and Fill area check
boxes, but can not access any of the other options.

After the Draw with color, there appears to be a color selection box,
but I can never get it to open. Up at the top, there's a Global |
Background check box, with a color selection box that allows me to get
into a color selector dialog.

The Boundary, Touchup, and Label tabs all show similar issues.

When looking at how other styles are setup, some of the greyed out
areas have information in them. (Such as labels on towns and villages,
the label tag has "name" in the box. I'd like to label lakes in my
style, but can not access the label tag entry box. I would also like
to change the color of the lake, but can't pick a different color.

I'm thinking that the map style editor just hasn't been fleshed out
yet. We can see the bones, but there's no functionality associated
with some of the dialogs yet.

I can see my next issue will be on how to write a tag selection rule
properly. It looks like the Key label goes between square braces, then
there are a number of decision words (is, isoneof, not, or, and,
possibly more), then value, or set of values to match.

There's some other slightly more esoteric rules such as:

Type is TrackPoint and  not HasTags

This shows that there are more things that can be tested for that
aren't just keys and values.

I see a lot of power available in the style editor, I'm just itching
to be able to release a little of it.

Snooping into the .mas file reveals that while some of the information
is plain text, there's some that might be hidden... not sure why there
would be a parking icon associated with water either...

<selector expr="[natural] is water or [landuse] is water"/>
</painter>
<painter
 zoomUnder="0.03" zoomUpper="1e+07"
 fillColor="#f6eeb677"
 icon=":/Art/Mapnik/parking.png" iconScale="0" iconOffset="0"
 drawTrafficDirectionMarks="yes">


I'm probably digging deeper into the program than I should be...

James
VE6SRV



More information about the Merkaartor mailing list