Locus Map - forum

Content & Tools => Themes - Vector maps => Topic started by: jusc on May 11, 2014, 17:12:00

Title: Theme developing question
Post by: jusc on May 11, 2014, 17:12:00
Is there any possibility to create a "new line" if there is a ";"  in name field instead of this ";", if you use some "bg-rect" instructions?

(http://s11.postimg.org/56d1mg2tr/bg_rect.jpg) (http://postimg.org/image/56d1mg2tr/)
Title: Re: Theme developing question
Post by: Menion on May 12, 2014, 12:18:50
hello Jusc. I'm checking code for a drawing texts in vector map library and this seems to be quite complicated task ...

Half and hour later: oki, let's try it.

Firstly, is ';' best possible separator? Isn't there possibility that this characted will be used also in common text? Isn't for example '|' better? Just think ...

May you also create for me a small map with some texts to test? I don't want bother Peter with it now ...
edit
ah no sorry, back. It's not possible. Whole library is too fixed on handling with one line of text (mainly parts that check overlaps over map tiles etc.), so it's not really simply possible.
Title: Re: Theme developing question
Post by: jusc on May 12, 2014, 22:15:53
@menion,
Ok, thank you for answering.
Title: Re: Theme developing question
Post by: Wojtas82 on July 12, 2014, 14:34:24
Hi,
Quick question :) Is it possible to render routes parallel to roads so they are not visible directly on top of road/path etc but next to it? I tried using dy and dx command for lines but it didn't work. Maybe there is a different method? Thanks in advance.
Title: Re: Theme developing question
Post by: john_percy on July 12, 2014, 20:12:26
Quote from: Wojtas82 on July 12, 2014, 14:34:24
Hi,
Quick question :) Is it possible to render routes parallel to roads so they are not visible directly on top of road/path etc but next to it? I tried using dy and dx command for lines but it didn't work. Maybe there is a different method? Thanks in advance.
Other ways; you can render them semi-transparent on top of the road/path, or wider and under the road/path, or as a series of dots on top of the road/path. All of these tricks are used in the available themes.
Title: Re: Theme developing question
Post by: Wojtas82 on July 12, 2014, 21:09:23
Thanks John,I already knew that.I'm still trying to get as best readability of colour coded bike routes in Poland as possible and a method with moving a route a little bit away from road would be a best solution. I'm talking about situation when 3 or more bike routes meet each other. I know a method with "multi" but I would like to try an innovative solution. Here's a small example of what I want to achieve :
http://mapa.ump.waw.pl/ump-www/?zoom=18&lat=54.48904&lon=18.49375&layers=B000000FFTFF (http://mapa.ump.waw.pl/ump-www/?zoom=18&lat=54.48904&lon=18.49375&layers=B000000FFTFF)
I know transparency is some kind of solution but this looks way better especially when cycling and you don't have enough time to check if you stick to the correct route.Also planning a trip over a certain route would be much easier.
Title: Re: Theme developing question
Post by: john_percy on July 17, 2014, 10:23:44
I can't access your link (banned site!) but if I understand what you are after, I suggest you try using lineSymbol to add repeating flags along the side of the way, such as are used in some themes for cliff edges. Locus can use scalable svg as well as png, but if you are using Orux you have to use png.
You should be able to arrange a different offset for different colours so they don't overlap, either by including a blank space in the image (png only, I think) or by use of "dx".
<lineSymbol src="file:/symbols/redpath.svg" dx="0" repeat="true"  repeat-gap="10dp"  scale="0.4" scale-icon-size="14,1.2" />

Title: Re: Theme developing question
Post by: popej on July 17, 2014, 14:15:25
Quote from: john_percy on July 17, 2014, 10:23:44
I can't access your link (banned site!)
I'm afraid something wrong is on your side. UMP is a free social project for creating maps of Poland, mostly for Garmin devices but you can get a map for Locus too ( http://download2.ump.waw.pl/mapsforge/latest-night.zip ). This project is older than OSM and for years was a better source of mapping data of Poland.

Sorry for off-topic, but for me ban for UMP sounds like ban for OSM, I can't imagine any reason for it.
Title: Re: Theme developing question
Post by: john_percy on July 17, 2014, 20:26:37
[offtopic]waw.pl is blocked on my system. I don't know what else is hosted there.[/offtopic]
Title: Re: Theme developing question
Post by: Wojtas82 on July 18, 2014, 09:33:19
Quote from: john_percy on July 17, 2014, 10:23:44
I can't access your link (banned site!) but if I understand what you are after, I suggest you try using lineSymbol to add repeating flags along the side of the way, such as are used in some themes for cliff edges. Locus can use scalable svg as well as png, but if you are using Orux you have to use png.
You should be able to arrange a different offset for different colours so they don't overlap, either by including a blank space in the image (png only, I think) or by use of "dx".
<lineSymbol src="file:/symbols/redpath.svg" dx="0" repeat="true"  repeat-gap="10dp"  scale="0.4" scale-icon-size="14,1.2" />



This doesn't work.According to http://docs.locusmap.eu/doku.php?id=manual:map_tools:vector_maps_theme_config#linesymbol (http://docs.locusmap.eu/doku.php?id=manual:map_tools:vector_maps_theme_config#linesymbol)

atributte dx and dy is not supported for linesymbol.
So I guess there is no solution at the moment.

UMP map, as Popej said, is 100% safe, I don't know why it is banned in your antivirus.
Title: Re: Theme developing question
Post by: jusc on July 18, 2014, 12:55:59
I think there is another problem with Mapsforge.
If a way is part of two networks p.e. of RCN and ICN, Mapsforge renders only your last rule and throws away your first rule.

For testing you can use the symbols I have attached.

I doesn´t work as I want. So it´s only a demo.  ;D

Quote
         <rule e="way" k="network" v="lcn">
           <lineSymbol src="file:../symbols/blue_line.png"   align-center="true"  repeat="true"  repeat-gap="0dp" scale="1.1" scale-icon-size="16,1.2" />      
        </rule>
        <rule e="way" k="network" v="rcn">
        <lineSymbol src="file:./symbols/orange_line.png"   align-center="true"  repeat="true"  repeat-gap="0dp" scale="1.1" scale-icon-size="16,1.2" />      
        </rule>
       <rule e="way" k="network" v="Icn">
       <lineSymbol src="file:./symbols/red_line.png"   align-center="true"  repeat="true"  repeat-gap="0dp" scale="1.1" scale-icon-size="16,1.2" />      
        </rule>
please correct the path for your use.
Title: Re: Theme developing question
Post by: Menion on July 18, 2014, 13:12:26
Ignore me if I'm completely out, because I do not read your complete discussion. Just info - Locus do not render data in exact same way as other apps, because of improvements I already made on MapsForge library. If you anyway find any problem in rendering in Locus, feel free to write me and we will check it with Peter and most probably fix (except known issues with titles).
Title: Re: Theme developing question
Post by: jusc on July 18, 2014, 13:50:59
@menion,
What I meant:
If a way is part of two different networks you have to define different rules for each network.
So please have a look, if you are able to render p. e. a bigger line for first network and a second smaller line ahead for the second network.
Example : if way belongs to ICN draw "red line with stroke-width= 6" and if way belongs to RCN too draw "yellow line stroke-width=3" over this red line.
I think it´s not possible, because the key is in both cases k="network".


Title: Re: Theme developing question
Post by: voldapet on July 18, 2014, 15:04:53
@jusc

I thing that it works as you want. You can see on the screenshot (internal cyclo theme) which shows way=22758779
(http://s8.postimg.org/pxd4krgip/icn_rcn_themes.jpg) (http://postimg.org/image/pxd4krgip/)

This way is member of four different relations. Anyway you can see
the dark red dots are from ICN rel=2775754
the light red dots are from RCN rel=15066

BTW:  there are two rules for LCN in your example
Title: Re: Theme developing question
Post by: jusc on July 18, 2014, 17:04:01
Quote from: voldapet on July 18, 2014, 15:04:53
@jusc

I thing that it works as you want. You can see on the screenshot (internal cyclo theme) which shows way=22758779


This way is member of four different relations. Anyway you can see
the dark red dots are from ICN rel=2775754
the light red dots are from RCN rel=15066

BTW:  there are two rules for LCN in your example

Hi Petr,
thank you for answer, but may you have look at:
http://mapa.ump.waw.pl/ump-www/?zoom=18&lat=54.48904&lon=18.49375&layers=B000000FFTFF

You can load the attached small osm file and see, the way uses two networks but with Poland map and Locus internal theme I only see one network...
Title: Re: Theme developing question
Post by: voldapet on July 18, 2014, 23:51:17
There are two LCN relations and one RCN relation. Mentioned two LCN (blue dots) relations are visible only as one line - this is known limitation of vector maps. However RCN route (red dots) is visible
(http://s17.postimg.org/r36vqv3nv/icn_rcn_themes_gdyna.jpg) (http://postimg.org/image/r36vqv3nv/)
Title: Re: Theme developing question
Post by: john_percy on July 19, 2014, 00:36:20
Quote from: Wojtas82 on July 18, 2014, 09:33:19
Quote from: john_percy on July 17, 2014, 10:23:44
... You should be able to arrange a different offset for different colours so they don't overlap, either by including a blank space in the image (png only, I think) or by use of "dx".

This doesn't work.According to http://docs.locusmap.eu/doku.php?id=manual:map_tools:vector_maps_theme_config#linesymbol (http://docs.locusmap.eu/doku.php?id=manual:map_tools:vector_maps_theme_config#linesymbol)

atributte dx and dy is not supported for linesymbol.
So I guess there is no solution at the moment.

FWIW, the use of "dx" is undocumented for lineSymbol but works (I've tried it out), and the inclusion of a blank space in a png can also be used to shift the image along.
Title: Re: Theme developing question
Post by: jusc on July 19, 2014, 10:31:14
Quote from: voldapet on July 18, 2014, 23:51:17
There are two LCN relations and one RCN relation. Mentioned two LCN (blue dots) relations are visible only as one line - this is known limitation of vector maps. However RCN route (red dots) is visible
(http://s17.postimg.org/r36vqv3nv/icn_rcn_themes_gdyna.jpg) (http://postimg.org/image/r36vqv3nv/)

Strange, that´s what I see:

(http://s27.postimg.org/ykgoc2va7/image.jpg) (http://postimg.org/image/ykgoc2va7/)
Title: Re: Theme developing question
Post by: voldapet on July 20, 2014, 07:23:29
@jusc
Could you please check that you have the latest Poland map, please? Check the history of RCN route - it is quite new.
Title: Re: Theme developing question
Post by: jusc on July 20, 2014, 13:33:50
Oh, yes you are right. After upgrading Poland map (from 31.03.14) to latest it´s ok now. Beginner failure!  :-[


@Wojtas,

I made some tests with "parallel" lines:

(http://s14.postimg.org/4x3xy9dhp/GD1.jpg) (http://postimg.org/image/4x3xy9dhp/)
(http://s13.postimg.org/tq9to5xcj/GD2.jpg) (http://postimg.org/image/tq9to5xcj/)


The problem is, that you have to define thick lines with "bold" colours before you render the ways.
My settings  p. E. zoom 15 -16
icn 10  #FF0000 (red)
ncn 8  #0055FF (blue)
rcn 6  #FF6A00 (orange)
lcn 4  #00FFFF (light blue)



Title: Re: Theme developing question
Post by: Wojtas82 on July 22, 2014, 20:35:46
Ok So I managed to make some "parallel" dots (testing) but I get empty spaces beetween like on the attached pic:


(http://s18.postimg.org/nqjwublz9/Screenshot_2014_07_22_20_32_26.jpg) (http://postimg.org/image/nqjwublz9/)

Here are my rules:

   <rule e="way" k="network" v="lcn">
      <lineSymbol src="file:/rower/blue_dot.png" repeat="true" repeat-gap="0dp" force-draw="1" scale="0.5" scale-icon-size="16,1.2" />     
   </rule>
   <rule e="way" k="network" v="rcn">
      <lineSymbol src="file:/rower/red_dot.png" repeat="true" repeat-gap="0dp" force-draw="1" scale="0.5" scale-icon-size="16,1.2" />     
   </rule>
   <rule e="way" k="network" v="ncn">
      <lineSymbol src="file:/rower/yellow_dot.png" repeat="true" repeat-gap="0dp" force-draw="1" scale="0.5" scale-icon-size="16,1.2" />     
   </rule>         

Force draw doesn't seem to work.Any chance to make it force?
Title: Re: Theme developing question
Post by: jusc on July 23, 2014, 08:32:58
These are my experiences too, symbols are not able to render complete lines. So this is not the solution yet.
Title: Re: Theme developing question
Post by: Wojtas82 on July 23, 2014, 09:03:01
Well in this case I think I will stay with the lines.Thanks jusc.
Title: Re: Theme developing question
Post by: Wojtas82 on October 09, 2014, 08:16:09
I'm struggling with different widths of bicyle routes.
Here's a part of a code from Elevelo Cycling L. It works fine with andromaps but doesn't work on Original Locus maps and Popej maps....http://www.gmaptool.eu/pl/content/locus-polska-osm (http://www.gmaptool.eu/pl/content/locus-polska-osm) Nothing shows up....
Can someone explain why and what should I change?  :) Thanks in advance

<rule e="way" k="tunnel" v="~|no|false" zoom-min="14">
<rule e="way" k="highway" v="tertiary|secondary|primary|tertiary_link|secondary_link|primary_link|construction|road|pedestrian|unclassified|residential|living_street|ford" >
<rule e="way" k="network" v="icn|ncn">
<line stroke="#80FF0000" stroke-width="3.96" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="rcn|lcn">
<line stroke="#900000FF" stroke-width="3.96" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="ucn|hcw">
<line stroke="#A061E6F2" stroke-width="3.96" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="mtb">
<line stroke="#A0FF8000" stroke-width="3.96" stroke-linecap="round" />
</rule>
</rule>
<rule e="way" k="highway" v="track|byway|bridleway|cycleway|service">
<rule e="way" k="network" v="icn|ncn">
<line stroke="#80FF0000" stroke-width="3.36" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="rcn|lcn">
<line stroke="#900000FF" stroke-width="3.36" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="ucn|hcw">
<line stroke="#A061E6F2" stroke-width="3.36" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="mtb">
<line stroke="#A0FF8000" stroke-width="3.36" stroke-linecap="round" />
</rule>
</rule>
<rule e="way" k="highway" v="footway|path|steps">
<rule e="way" k="network" v="icn|ncn">
<line stroke="#80FF0000" stroke-width="2.88" stroke-linecap="round" />
<line stroke="#A0FFFFFF" stroke-width="1.44" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="rcn|lcn">
<line stroke="#900000FF" stroke-width="2.88" stroke-linecap="round" />
<line stroke="#A0F0FFF0" stroke-width="1.44" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="ucn|hcw">
<line stroke="#A061E6F2" stroke-width="2.88" stroke-linecap="round" />
<line stroke="#A0F0FFF0" stroke-width="1.44" stroke-linecap="round" />
</rule>
<rule e="way" k="network" v="mtb">
<line stroke="#A0FF8000" stroke-width="2.88" stroke-linecap="round" />
<line stroke="#A0F0FFF0" stroke-width="1.44" stroke-linecap="round" />
</rule>
</rule>
</rule>
Title: Re: Theme developing question
Post by: jusc on October 09, 2014, 09:32:42
it works until zoom level 13 with Locus maps. What is the diffrence?
Title: Re: Theme developing question
Post by: Wojtas82 on October 09, 2014, 13:35:50
Because there are different rules for icn/rcn/lcn etc. for zoom levels 0-13. I would like to see different route widths for wider roads like primary etc. and smaller for paths, tracks....
Title: Re: Theme developing question
Post by: popej on October 09, 2014, 15:17:42
On my maps marked trails don't have tags "highway", thats why they won't be visible with conditions that you have included into your style.

I add artificial tag route=hiking|foot|bicycle|mtb|ski|sled|piste|ferry (maybe more, values are taken from relation type).

Edit: I add new ways for marked trails to OSM data, there should be an original way with tag highway= at the same place.
Title: Re: Theme developing question
Post by: Wojtas82 on October 09, 2014, 15:20:55
That would be great if you could do that Popej. But maybe there is a workaround?
Title: Re: Theme developing question
Post by: popej on October 09, 2014, 15:25:59
I"m afraid that if I add "highway" to new ways, then Locus will draw multiple roads one over another. I could add next artificial tag to marked trail, which could describe used road, but then no style except yours would understand this.
Title: Re: Theme developing question
Post by: Wojtas82 on October 09, 2014, 15:29:27
I understand. Right now the part of the code I posted earlier is understood only by andromaps...So there is probably some different combination used...I'm not exactly sure how it was done yet.
Title: Re: Theme developing question
Post by: popej on October 09, 2014, 16:14:00
Maybe maps by andromaps don't include new ways, only new tags are added to existing ways? This would preserve highway tag but won't allow for multiple trails on a single way.

If Locus could reveal which tags are used for marked trails on their maps I could try to comply with this schema.
Title: Re: Theme developing question
Post by: Wojtas82 on October 09, 2014, 21:00:04
Popej I'm not exactly sure but the thing is you can set the different widths for primary|tertiary etc and different for paths and tracks. It makes map more readable. I also noticed that some routes are not visible on your maps and it's not themes fault. For example if you have a part of a track with 2 lcn on it, only one is visible. But if you have rcn,lcn and for example nwn all 3 are rendered. It's probably some error that 2 routes of the same type are not saved in a map? I hope you know what I mean :)
Title: Re: Theme developing question
Post by: popej on October 09, 2014, 23:28:56
I don't analyze network type, when creating marked trails. There is no difference between 2 lcn and rcn + lcn. But are you sure that 2 overlapping lcn would be visible on map if they share the same pattern and maybe the same length of reference number?

I see other problem, I remove trails, which have no defined colour, if there is other trail on the same way. Maybe not a good simplification, but my goal was to get colour trails.

Could you point an example on map?
Title: Re: Theme developing question
Post by: Wojtas82 on October 09, 2014, 23:46:07
Sure. This example shows 1 walking route with black colour and 2 lcn bike routes without colour.
http://www.openstreetmap.org/way/297743532 (http://www.openstreetmap.org/way/297743532)
I think that erasing trails without colour isn't a good idea. Sometimes you may find routes without colours but marked in a specific way. The more routes the better. I use a neutral colour for routes without colour specification. These should also be visible on the map. My theme should include them ;)
Title: Re: Theme developing question
Post by: jusc on October 10, 2014, 15:34:28
Quote from: popej on October 09, 2014, 23:28:56
I don't analyze network type, when creating marked trails. There is no difference between 2 lcn and rcn + lcn.

So I wonder how this works:
My hiking theme shows a rwn (verified in JOSM). Are hiking ways (routes of a network) analyzed?
(http://s11.postimg.org/pf0xkpunz/pct1.jpg) (http://postimg.org/image/pf0xkpunz/)
Title: Re: Theme developing question
Post by: popej on October 10, 2014, 15:52:41
Ok, in your example hiking trail with color suppress bicycle trails without color. I will add these trails without color, probably standard Locus style will display them with pattern depending on network.

@jusc: By "not analize" I mean that I copy tag "network" without checking its value. It is style, that finds network values and uses appropriate patterns for drawing.

Edit: I have updated my map of Poland, now without filtering trails. File for download is here:
http://www.gmaptool.eu/en/content/locus-poland-osm
Title: Re: Theme developing question
Post by: Wojtas82 on October 10, 2014, 22:14:27
Popej, great job! And fast as usual :) Now it's all fine. I'm developing a new theme containing parts of andromaps and V-scale themes and of course my customization. It is focused on bicycle trails in Poland. It also contains hiking trials. I'm not exactly sure if I can post it, I don't want to make some people angry at me for coping their work (well, not 100% coping ;) Anyone developing andromaps is here? Jusc, are you ok with that? :)
Title: Re: Theme developing question
Post by: jusc on October 11, 2014, 07:54:58
Sure, no problem.  :)
Title: Re: Theme developing question
Post by: voldapet on October 11, 2014, 10:08:44
Hi Guys,
only briefly: Locus maps are created in the same way as @popej maps. From every relation is created new way which has tags of parent Relation. Or better has only some tags from parent relation. For this reason the rule highway="..." can not work for marked trails
The second approach which @popej mentioned id to set tags from relation to children ways but it is needed to handle multiple name or ref attributes.

Locus cycle theme render cycle routes only based on lcn, rcn, tags. If relation does not contain network tag then is replaced by lcn tag.



Title: Re: Theme developing question
Post by: jusc on October 11, 2014, 12:27:06
Can I make a wish for cyclists? I would like to have some more informations on Locus and CT maps.
I compared OpenAndromaps Poland with Locus and CT map with one theme. Maybe I did something wrong with Locus and CT map? Please have a look.
@popej,
do you plan a Germany map?

(http://s4.postimg.org/66mcisc61/th_dev.jpg) (http://postimg.org/image/66mcisc61/)
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 17:13:54
I'm almost finished with my beta 1 version of a theme. The only thing I'm struggling with is when 2 different routes of a same type (i.e. lcn) belong to the same road, the path text are displayed on each other and very often they become unreadable. Actually there is a small workaround for it but only for 2 different relation (i.e. rcn and lcn on the same road can be displayed separately by using dx attribute). Is there any solution for this?

http://forum.locusmap.eu/index.php?topic=3976.msg30010#msg30010 (http://forum.locusmap.eu/index.php?topic=3976.msg30010#msg30010)
Here's a link for testing. Colour coded BICYCLE routes are only shown on popej's map...I'm not sure why?
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 17:16:54
Quote from: jusc on October 11, 2014, 12:27:06
Can I make a wish for cyclists? I would like to have some more informations on Locus and CT maps.
I compared OpenAndromaps Poland with Locus and CT map with one theme. Maybe I did something wrong with Locus and CT map? Please have a look.
@popej,
do you plan a Germany map?

(http://s4.postimg.org/66mcisc61/th_dev.jpg) (http://postimg.org/image/66mcisc61/)
Missing cycle route - it's because this map is old...probably from september and Ct is the latest (October)

Edit:
Are the mtb uphill arrows based on incline tag? If not they can be displayed randomly, not in the direction of incline bacause mtb uphill scale tag doesn't include a direction.
Title: Re: Theme developing question
Post by: popej on October 11, 2014, 17:49:27
Quote from: jusc on October 11, 2014, 12:27:06I compared OpenAndromaps Poland with Locus and CT map with one theme. Maybe I did something wrong with Locus and CT map? Please have a look.
You can look at my tag-mapping.xml, it is included in archive with map. There is no "mtb:scale:uphill". I don't process OSM data with tag-transform, so there are raw OSM names and values for tags like sac_scale.

Which style are you using?

I could make more maps but the main problem is that I'm not an active Locus user and it is difficult for me to maintain these maps properly. But I can compile Germany anyway.
Title: Re: Theme developing question
Post by: Tobias on October 11, 2014, 17:59:11
Quote from: Wojtas82 on October 10, 2014, 22:14:27
Anyone developing andromaps is here?
It's OK for me as long as you stick to the license, it's contained in all xml files as well as here: http://www.openandromaps.org/en/legend/elevate-mountain-hike-theme#license (http://www.openandromaps.org/en/legend/elevate-mountain-hike-theme#license) (all other current openandromaps themes have this license as well as they are based now on Elevate)
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 18:17:52
Thanks  ;D
Popej, I found a bug inyour ap(probably some rendering issue).
Here's a link to a video showing this bug. Something is wrong withbackground, area is preety big, Its near Lodz.
http://www22.zippyshare.com/v/68012870/file.html (http://www22.zippyshare.com/v/68012870/file.html)
Title: Re: Theme developing question
Post by: popej on October 11, 2014, 20:43:29
It's probably this polygon:
https://www.openstreetmap.org/relation/1757828

I don't know why it is visible. On OSM map it looks the same, when you zoom in.
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 20:51:57
Nice find  :o I checked on few different themes and it is visible too. Any chance to exclude it from your map? :)
Title: Re: Theme developing question
Post by: popej on October 11, 2014, 21:20:09
I can filter it out, but question is why it is visible at all? Neither tag-mapping.xml nor style should process it. Is there some display procedure for unknown polygons?
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 21:33:37
To be honest I don't know. By the way, if you will filter it out could you also add these tags tag-mapping.xml?
-incline
-mtb:scale:uphill
-footway=crossing and cycleway=crossing (I want to add zebras for combinations like here http://www.openstreetmap.org/way/232025392 (http://www.openstreetmap.org/way/232025392) )
Thanks in advance.  :D
Title: Re: Theme developing question
Post by: popej on October 11, 2014, 21:38:42
Look at history of this polygon. 2 days ago it was tagged as "building=house". That is the reason, next compilation should be correct.

I will add these tags.
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 21:43:06
That explains everything. :) Good move, I didn't check the history but now I can see it had the same colour as buildings :)
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 22:09:42
Popej, I also tried to display proposed routes which are included in your map:
      <osm-tag key="state" value="proposed" zoom-appear="12" />

I tried many combinations and I can't display them anyway. Here is last combination I tried:

   <rule e="way" k="state" v="proposed">
      <line stroke="#FF0000" stroke-width="10" stroke-linecap="butt" />
   </rule>

Maybe someone could help with this one?

Here's an example proposed route
https://www.openstreetmap.org/relation/2470458 (https://www.openstreetmap.org/relation/2470458)
Title: Re: Theme developing question
Post by: popej on October 11, 2014, 22:32:26
I have not transfered tag "state" from relation to ways. I can add it.

Problem is with tag "incline". As I understand tag-mapping rules, value of a tag should be added directly. I have added "up" and "down" but no numeric values. This could be corrected with tag-transform process, but currently I'm not doing it.
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 22:45:23
Ok, Thanks a lot! (btw historic day for us  ;D :)
Title: Re: Theme developing question
Post by: popej on October 11, 2014, 23:36:15
I have updated my map of Poland. Please try new tags.
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 23:41:07
Link doesn't work ...
Title: Re: Theme developing question
Post by: popej on October 11, 2014, 23:48:45
I forgot to clear caches, try again.
Title: Re: Theme developing question
Post by: Wojtas82 on October 11, 2014, 23:50:09
All good, downloading.
Title: Re: Theme developing question
Post by: jusc on October 12, 2014, 13:03:52
Quote from: popej on October 11, 2014, 17:49:27

You can look at my tag-mapping.xml, it is included in archive with map. There is no "mtb:scale:uphill". I don't process OSM data with tag-transform, so there are raw OSM names and values for tags like sac_scale.

Which style are you using?

I could make more maps but the main problem is that I'm not an active Locus user and it is difficult for me to maintain these maps properly. But I can compile Germany anyway.

Style? Do you mean Theme?
http://forum.locusmap.eu/index.php?topic=4057.0 I´m always changing it for my own use outside  ;D
Title: Re: Theme developing question
Post by: popej on October 12, 2014, 17:31:17
Thanks, I have downloaded your V-Scale2_Pure and couldn't find rules for uphill marking.
Title: Re: Theme developing question
Post by: jusc on October 12, 2014, 19:47:15
That is the wrong one.
Should V-S2_Cycle_OAM or similar. At least "Cycle" should be piece of the name of the theme.
Title: Re: Theme developing question
Post by: popej on October 12, 2014, 23:40:13
I have compiled test map of Germany. It is divided into 19 tiles and packed into 2 archives, temporary links:
(sorry, files deleted)
Title: Re: Theme developing question
Post by: jusc on October 13, 2014, 13:23:59
@popej
Germany maps are looking very nice. Thank you very much.
I will make some tests with my themes, specially for hiking with coloured ways and hiking symbols and come back later.
One question for now: Is there a special reason to divide the map into 19 small maps.
All maps have about 1,5 - 1,6GB, that could be clued to one or two maps. Can I (or users) copy the maps together?

Title: Re: Theme developing question
Post by: popej on October 13, 2014, 17:37:34
Size of a map is limited by RAM available for java at compilation time. I probably could make map of Germany in 2 pieces. But I'm testing procedures for bigger maps, for example full Europe.

I'm not sure if Locus has full support for a tiled map. Prepared tiles seems to switch correctly unless I zoom far out. Is there a way to switch maps basing not only on position but on zoom (layer) too?
Title: Re: Theme developing question
Post by: Wojtas82 on October 13, 2014, 19:33:29
Hi Popej, I'm testing the tags you've added, so far so good. Great job. I need some extra time to modify my theme so I will also get back soon. I was wondering if we could solve path text overlapping problem like this:

Let's say we have to LCN on the same road and we want to display their names properly (not overlapping each other). Maybe you could somehow merge names of 2 LCN so the road with 2 LCN has only one route name like this "LCN 1 / LCN 2". And the same for "ref" tags.That could be a nice workaround. And if we have RCN and LCN on one road we could just use "dy" attribute so nothing is really needed to be done in this particular case. Thanks in advance :)
Title: Re: Theme developing question
Post by: jusc on October 13, 2014, 20:18:27


Quote from: popej on October 13, 2014, 17:37:34
Size of a map is limited by RAM available for java at compilation time. I probably could make map of Germany in 2 pieces. But I'm testing procedures for bigger maps, for example full Europe.

I'm not sure if Locus has full support for a tiled map. Prepared tiles seems to switch correctly unless I zoom far out. Is there a way to switch maps basing not only on position but on zoom (layer) too?

Locus is able to load maps automatically, but I don't use this, because I have a lot of vector maps and I mostly don't know which map will be loaded. Two pieces of map would make it easier for me. :)
Title: Re: Theme developing question
Post by: popej on October 13, 2014, 23:28:40
Quote from: Wojtas82 on October 13, 2014, 19:33:29Maybe you could somehow merge names of 2 LCN so the road with 2 LCN has only one route name like this "LCN 1 / LCN 2". And the same for "ref" tags.
I"ll think about it. I can't see any nice solution but maybe I'll get a good idea.

Quote from: jusc on October 13, 2014, 20:18:27I have a lot of vector maps and I mostly don't know which map will be loaded.
Would be nice to have a possibility to group a set of tiles into a single map. And to add an overview map, which could be visible when zooming out. This would be a basic support. I don't like to see a long list of vector maps either. But I'm a casual user of Locus, maybe there are solutions, that I'm not aware of?

Title: Re: Theme developing question
Post by: Wojtas82 on October 14, 2014, 09:43:49
Quote from: popej on October 13, 2014, 23:28:40
Quote from: Wojtas82 on October 13, 2014, 19:33:29Maybe you could somehow merge names of 2 LCN so the road with 2 LCN has only one route name like this "LCN 1 / LCN 2". And the same for "ref" tags.
I"ll think about it. I can't see any nice solution but maybe I'll get a good idea.



That would be great. Thanks in advance for trying ;)

One other thing:
    <rule e="way" k="network" v="iwn|nwn" >
This short example rule applies to iwn OR nwn, but is it possible to write a rule which applies to both of these routes? I'm talking about a rule that would work like this:
<rule e="way" k="network" v="iwn AND nwn">
So it only works when both conditions are met... I.e. a part of a road which has iwn AND ncn on it....
That would help me a lot with color coded routes.
Title: Re: Theme developing question
Post by: popej on October 14, 2014, 12:00:54
Quote from: Wojtas82 on October 14, 2014, 09:43:49
<rule e="way" k="network" v="iwn AND nwn">
2 conditions should form AND:
<rule e="way" k="network" v="iwn">
   <rule e="way" k="network" v="nwn">

But you won't find that kind of routes on my maps.

I have 2 ideas about multiple routes on one way:
- add some artificial tag, like "instance=2" or "instance:lcn=2" on second route,
- draw second route in opposite direction,

I'd rather prefer first idea, this won't change anything in OSM data.
Title: Re: Theme developing question
Post by: Wojtas82 on October 14, 2014, 12:49:05
Quote from: popej on October 14, 2014, 12:00:54
Quote from: Wojtas82 on October 14, 2014, 09:43:49
<rule e="way" k="network" v="iwn AND nwn">
2 conditions should form AND:
<rule e="way" k="network" v="iwn">
   <rule e="way" k="network" v="nwn">

But you won't find that kind of routes on my maps.

I have 2 ideas about multiple routes on one way:
- add some artificial tag, like "instance=2" or "instance:lcn=2" on second route,
- draw second route in opposite direction,

I'd rather prefer first idea, this won't change anything in OSM data.
Popej, sorry I meant iCn and nCn :)
About route names: I also prefer first method. I wonder how that would work? Drawing second route in opposite direction isn't a best idea, what if we have 3 or more routes on the road? :)

EDIT: What I'm trying to achieve:
Example 1: 1 blue route on the road shows solid blue line.
Example 2: 1 blue and 1 green route on the route shows dashed blue/green line.

<rule e="way" k="state" v="~">
<rule e="way" k="osmc" v="*">
<rule e="way" k="route" v="bicycle" zoom-min="17">
<rule e="way" k="osmc_color" v="blue">
<line stroke="#880000FF" stroke-width="5" stroke-linecap="round" />
</rule>
<rule e="way" k="osmc_color" v="blue">
<rule e="way" k="osmc_color" v="green">
<line stroke="#880000FF" stroke-width="5" stroke-dasharray="10,10" stroke-linecap="butt" />
<line stroke="#88008000" stroke-width="5" stroke-dasharray="0,10,10,0" stroke-linecap="butt" />
</rule>
</rule>
<rule e="way" k="osmc_color" v="yellow">
<line stroke="#88FFFF00" stroke-width="5" stroke-linecap="round" />
</rule>
<rule e="way" k="osmc_color" v="green">
<line stroke="#88008000" stroke-width="5" stroke-linecap="round" />
</rule>
<rule e="way" k="osmc_color" v="red">
<line stroke="#88FF0000" stroke-width="5" stroke-linecap="round" />
</rule>
<rule e="way" k="osmc_color" v="black">
<line stroke="#88000000" stroke-width="5" stroke-linecap="round" />
</rule>
<rule e="way" k="osmc_color" v="white">
<line stroke="#9966FF" stroke-width="3" stroke-linecap="round" />
</rule>
</rule>
</rule>
</rule>


But it doesn't seem to work....
This part dosn't display at all
            <rule e="way" k="osmc_color" v="blue">
               <rule e="way" k="osmc_color" v="green">
                  <line stroke="#880000FF" stroke-width="5" stroke-dasharray="10,10" stroke-linecap="butt" />
                  <line stroke="#88008000" stroke-width="5" stroke-dasharray="0,10,10,0" stroke-linecap="butt" />
               </rule>
            </rule>
Title: Re: Theme developing question
Post by: popej on October 14, 2014, 15:27:46
If I add some tags for second and next routes, then you cold define different for them, for example put an offset to trail name/ref.

Your theme won't work, value "osmc_color" (or "network" in my example), can't have 2 values at once. Sorry for misleading you.


Title: Re: Theme developing question
Post by: Wojtas82 on October 14, 2014, 15:38:08
Ok. We can try it.
Second case, I wonder if there is any solution for that one That would make maps even more readable and intuitive.
Title: Re: Theme developing question
Post by: jusc on October 14, 2014, 16:28:47
@popej,

how can I sho  an osmc:symbol: black:black:black_rectangle:H:white    Symbol on your map?
I get only a black rectangle, but now white "H"

http://waymarkedtrails.org/de/relation/2092679?zoom=14&lat=52.24198&lon=7.74206&hill=0#routes
Title: Re: Theme developing question
Post by: popej on October 14, 2014, 17:33:00
I have tunned my maps to standard Locus theme. I don't provide "osmc:symbol" but I split its value to 3 tags: osmc_color, osmc_foreground and osmc_background.

I could preserve entire osmc:symbol too, but it could be too complicated to analyze in theme. Or I could add more tags, like osmc_foreground2, osmc_text, osmc_textcolor.

What tags do you expect?
Title: Re: Theme developing question
Post by: jusc on October 14, 2014, 18:07:00
You are right, it´s hard to say Normally it should look like on http://hiking.waymarkedtrails.org/en/help/rendering/osmc but a lot of ways don´t have filled all five tags from
osmc:symbol=waycolor:background:foreground:text:textcolor

The missing H:White (Text:white)  isn´t shown with original Locus maps and hike theme too.
So I don´t know what to do to get it work at the moment.
Title: Re: Theme developing question
Post by: Wojtas82 on October 14, 2014, 23:59:56
After many test I was able to display parallel lines but sometimes parts of them are missing randomly like here.
(http://s23.postimg.org/vnrojxvtj/Screenshot_2014_10_14_23_54_59.jpg) (http://postimg.org/image/vnrojxvtj/)
When dy is set to 0 the whole route is displayed properly...
<rule e="way" k="osmc_color" v="red">
<line stroke="#FF0000" priority="40" force-draw="1" dy="16" stroke-linejoin="round" stroke-width="1" stroke-linecap="round" />
</rule>

Here's a link to OSM
http://www.openstreetmap.org/way/184490078 (http://www.openstreetmap.org/way/184490078)
Any one knows solution?
Title: Re: Theme developing question
Post by: jusc on October 15, 2014, 07:44:40
@Wojtas82,

I made the same experiences and I think, it´s beacause "dy=" ist not usable with ways at this time. It´s a part of Mapsforge or Locus.
Title: Re: Theme developing question
Post by: Menion on October 15, 2014, 08:06:39
you found experimental feature :). DY parameter for ways is currently in testing anyway it's not yet fully working, so don't use it
Title: Re: Theme developing question
Post by: Wojtas82 on October 15, 2014, 08:28:32
Thanks! Any estimated date of implementation Menion
Title: Re: Theme developing question
Post by: Menion on October 15, 2014, 08:34:15
it's not so simple, so don't expect it soon. Sorry.
Title: Re: Theme developing question
Post by: Wojtas82 on October 15, 2014, 08:47:09
Oh thats a shame. This feature gives a lot of possibilities.
Title: Re: Theme developing question
Post by: Wojtas82 on October 15, 2014, 09:55:28
That's where I found it:
https://code.google.com/p/mapsforge/wiki/RenderthemeV4 (https://code.google.com/p/mapsforge/wiki/RenderthemeV4)
https://code.google.com/p/mapsforge/source/browse/mapsforge-map/src/main/resources/renderTheme-v4.xsd (https://code.google.com/p/mapsforge/source/browse/mapsforge-map/src/main/resources/renderTheme-v4.xsd)
Title: Re: Theme developing question
Post by: Menion on October 15, 2014, 13:17:03
Understand. Locus anyway do not use new version of MapsForge library, but just older version 0.3 with own improvements. So some new tags won't work in Locus. Sorry.
Title: Re: Theme developing question
Post by: jusc on October 18, 2014, 17:48:30
Thank you
@menion for implementig "dy for ways"
and thank you
@popej for creating a map that can be used for testing this new feature.
Unfortunately the "dy"-lines sometimes are on the right, sometimes on the left, or sometimes above or below the ways.
Depends it from the direction the way is drawn?

(http://s10.postimg.org/pkfziild1/dy_1.jpg) (http://postimg.org/image/pkfziild1/)
Title: Re: Theme developing question
Post by: Menion on October 19, 2014, 07:51:29
yes it depends. How this may happen (on your screenshot)? Is it possible, that lines are draw in OSM data in opposite direction here?
Title: Re: Theme developing question
Post by: jusc on October 19, 2014, 15:26:42
Yes the north part of thy way between Bühne and Suderode is drwan from north to south. the south path from south to north.
In the theme, the icn has dy="-10" for test.
Title: Re: Theme developing question
Post by: Menion on October 19, 2014, 16:25:15
hmm then there is nothing I can do with it now ...
Title: Re: Theme developing question
Post by: Wojtas82 on October 19, 2014, 17:04:32
These parallel lines look very nice Jusc. Very useful when you have a hiking route and i.e. 2 bicycle routes. You can easly follow the route you want.
Title: Re: Theme developing question
Post by: jusc on October 19, 2014, 17:24:42
Yess, but you see the problem? Sometimes the lines change the side of the way, because it depends on how the way is drawn, from south to north, east to west or vice versa.
I hoped I could show parallel cycle routes (icn,ncn and so on) but I fear that is not really possible.
Title: Re: Theme developing question
Post by: Wojtas82 on October 19, 2014, 17:28:37
Yeah, exactly I also noticed it. But I don't see a solution for this one unless dy parameter is added to the whole route not the part of the road. You know what I mean? I'm not sure. Maybe google "osmapa szlaki" and check this map I heard they tried to solve this problem?
Title: Re: Theme developing question
Post by: popej on October 20, 2014, 16:08:45
The solution would be to process trails, merge parts and swap direction for some parts. A bit complicated with tools I'm using for Locus but not impossible. But does "dy" option work for current Locus version?
Title: Re: Theme developing question
Post by: jusc on October 20, 2014, 19:32:25
Yes in newest beta version "dy" works.
Title: Re: Theme developing question
Post by: Wojtas82 on October 20, 2014, 19:42:45
As Locus team said:it's still in testing but why not we test it with them? Popej how difficult is it to make one-sided routes? That would be great solution.
Title: Re: Theme developing question
Post by: popej on October 20, 2014, 22:50:21
How difficult? Like one evening and a little more? ;)
Problem is that I have some other task to complete and some books to read.
Title: Re: Theme developing question
Post by: Wojtas82 on October 20, 2014, 23:05:48
Uffff I thought it's gonna take a lot more time :) Thats good news :)
BTW I have made new theme based on StyleCycle.
It shows:
Bicycle Routes in colours (wider ones, solid colour)
Hiking Routes in colours (narrower ones,dashed)
Sac Scale - (black=easy, blue=medium, red=hard)
Mtb Uphill (numbers along tracks and paths)
Incline Up and down (red/yellow arrows showing downhill direction)
Mtb Scale still to be done.
There's still plenty to do but at least you can check results I made so far.I wonder what y'all think.
Edit:
I forgot, Popej, could you add these tags when you have some spare time?
amenity=bicycle_parking
cycleway=lane
cycleway=opposite_lane
cycleway=opposite
cycleway=shared_lane
cycleway:left=lane
cycleway:right=lane
bicycle=permissive

thanks :)
Title: Re: Theme developing question
Post by: 0n1y on October 21, 2014, 14:43:12
what lines and tags of xml files responsible for this (general?) hike or bike tracks?
(http://s28.postimg.org/r94jnhvpl/Screenshot_2014_10_21_07_40_40.jpg) (http://postimg.org/image/r94jnhvpl/)
wanna change them to blue ones in some themes for OSM style and better visibility  8)
Title: Re: Theme developing question
Post by: Wojtas82 on October 21, 2014, 17:52:18
You want to change colour of pathss or roads?
Title: Re: Theme developing question
Post by: 0n1y on October 21, 2014, 19:41:09
those poorly visible dotted ones in the forest.
VScale Pure has the same dashed lines:
(http://s18.postimg.org/mvi45dlgl/VS_C_5.jpg) (http://postimg.org/image/mvi45dlgl/)
Title: Re: Theme developing question
Post by: Wojtas82 on October 21, 2014, 20:39:23
I use Notepad++ for editing.
Try searching for "path" or "track" or any other that is dashed i.e.
you should find something like this or similar:
<rule e="way" k="highway" v="footway|path" zoom-min="12">
<line stroke="#707070" stroke-width="0.6" stroke-dasharray="5,5" stroke-linecap="butt" />
</rule>

and then delete stroke-dasharray="5,5"
And you will get solid lines. :)
Title: Re: Theme developing question
Post by: popej on October 21, 2014, 22:57:48
17 bicycle trails on a single way: http://www.openstreetmap.org/way/224177777
How do you draw it on a map? ;)
Title: Re: Theme developing question
Post by: Wojtas82 on October 21, 2014, 23:06:41
Nice find. I found max 5 in Poland near Szczecinek  ☺I guess this is a small exeption so you  would have 17 routes very close to each other or overlapping. Anyway Germany uses different hierarchy than Poland lcn rcn ncn so probably just overlapping.
Title: Re: Theme developing question
Post by: 0n1y on October 22, 2014, 23:49:27
Quote from: Wojtas82 on October 21, 2014, 20:39:23
Try searching for "path" or "track" or any other that is dashed i.e.
you should find something like this or similar
their name is legion but i found it ) new thickness, solid lines, much appreciated )
Title: Re: Theme developing question
Post by: Wojtas82 on October 23, 2014, 08:25:44
Glad I could help.
Title: Re: Theme developing question
Post by: jusc on October 23, 2014, 08:44:32
Quote from: 0n1y on October 21, 2014, 19:41:09
those poorly visible dotted ones in the forest.
VScale Pure has the same dashed lines:
(http://s18.postimg.org/mvi45dlgl/VS_C_5.jpg) (http://postimg.org/image/mvi45dlgl/)
Yes, it should show ICN network over a way tagged as (normal) path.
If you want to follow ICN with bicyle the red ICN should help, the path is shown for a preview whlie sitting on a sofa.  ;D
Title: Re: Theme developing question
Post by: Wojtas82 on October 23, 2014, 08:46:33
Well, everyone has different needs, let's respect this  ;D ;D ;D
Title: Re: Theme developing question
Post by: 0n1y on October 23, 2014, 15:58:39
I don't get it anyway. ;D
Title: Re: Theme developing question
Post by: popej on October 25, 2014, 17:46:48
I have updated my map of Poland:
http://www.gmaptool.eu/en/content/locus-poland-osm

Map include some new tags, as requested by Wojtas82.

Marked tralis are drawn without swapping direction on successive ways.

For bicycle routes with icn/ncn/rcn/icn network I have added new tags: "instance:icn", "instance:ncn", "instance:rcn", "instance:lcn". These tags indicate second and next trail drawn on a way. Values for tags can be: [2..9,x], where "x" means 10-th and next instances. These tags can be used to change graphics or text position for multiple trails.
Title: Re: Theme developing question
Post by: Wojtas82 on October 25, 2014, 20:41:15
Wow Popej, thanks very much, now I have plenty to do! :) Will post progress as soon as possible :)
Title: Re: Theme developing question
Post by: JoxM on October 26, 2014, 08:39:44
Hi again,
don't know if this question was asked before.
Is it possible to get a night (dark) colour for the menus?
Because if you're using the night colour for the map and you need to enter into a menu the white background is too light.
Title: Re: Theme developing question
Post by: voldapet on October 27, 2014, 08:29:35
@JoxM
It's little bit out of topic :) Anyway there is already similar feature request on http://help.locusmap.eu/responses/support_amoled  Unfortunately this ideas is declined at this moment because it's quite difficult to implement it. However you can vote for it :)
Title: Re: Theme developing question
Post by: Wojtas82 on October 27, 2014, 09:07:04
@ Popej, I made some test and here's a problem I'm experiencing. Bike routes should be on "one side" not dependend on road direction but here's a result :

(http://s27.postimg.org/xksg1nran/Screenshot_2014_10_27_09_01_08.jpg) (http://postimg.org/image/xksg1nran/)
Here's the spot on OSM :
http://www.openstreetmap.org/#map=18/54.50005/18.47150&layers=C (http://www.openstreetmap.org/#map=18/54.50005/18.47150&layers=C)

As you can see blue line changes side of the road when switching from residential road to footpath. Maybe it should be like this? Thanks in advance for explanation :)

EDIT:
I also hoped we could have bicycle routes at only one side (on the right side of direction) and hiking/foot routes on the left side. Now they appear randomly on right or left. That would look nicer on the map, we could have bicycle routes at, let's say dy=-20 and hiking on the other side of the road at dy=20.
:)

Title: Re: Theme developing question
Post by: jusc on October 27, 2014, 09:44:00
@Wojtas82,

as I understood you want to create a cycle theme at first.
Why do you want to implement cycle routes and hike routes together in one theme? And why not devide the themes?
If you are cycling you don´t want to think about: "Is this a cycle or a hike route?" (At least for me  ;D )
Title: Re: Theme developing question
Post by: Wojtas82 on October 27, 2014, 10:00:35
@jusc
You're right but combining both types of routes (bike and hike) is good for orientation. Here where I live, there are mostly hiking routes which are very often suitable for biking. I would like to achieve 3 themes: hiking, biking and hike and biking :)
So that's why :)
Title: Re: Theme developing question
Post by: popej on October 27, 2014, 12:57:37
Quote from: Wojtas82 on October 27, 2014, 09:07:04
@ Popej, I made some test and here's a problem I'm experiencing. Bike routes should be on "one side" not dependend on road direction but here's a result :
Nobody's perfect ;)
I don't make a full analysis of relation, I assume that relation is created correctly as an ordered list of ways (http://wiki.openstreetmap.org/wiki/Relation). I follow this order and swap direction of ways as necessary. In your example relation has its ways out of order, which breaks analysis.

Quote from: Wojtas82 on October 27, 2014, 09:07:04I also hoped we could have bicycle routes at only one side (on the right side of direction) and hiking/foot routes on the left side. Now they appear randomly on right or left.
This requirement is in conflict with continuous lines. You can't have both at once.
Title: Re: Theme developing question
Post by: Wojtas82 on October 27, 2014, 13:06:11
I also noticed that instance tag works fine when you have 2 or more routes of the same kind (i.e. 3 lcn routes get 3 different numbers) the you can set different "dy" attribute for them and nicely display them like this:

(http://s7.postimg.org/p6rwhljef/Screenshot_2014_10_27_12_43_29.jpg) (http://postimg.org/image/p6rwhljef/)
but if you have 1 lcn and 1 ncn on same road they receive same numbers and path text overlaps.
@ Popej, maybe the solution is to put bike routes in one bag like this "instance:bicycle"? so all the routes on a part of the road become equivalent and receive different instance number? How do you think?

EDIT:
Here's a part of a code I ised for lcn's.
<rule e="way" k="route" v="bicycle">
<rule e="way" k="network" v="*">
<rule e="way" k="network" v="lcn">
<rule e="way" k="instance:lcn" v="~">
<pathText k="name"  font-style="bold" font-size="14"  dy="-20" scale-font-size="17,1.15" font-family="monospace"  fill="#000000" stroke="#ffffff" stroke-width="3.5" />
</rule>
<rule e="way" k="instance:lcn" v="2">
<pathText k="name"  font-style="bold" font-size="14"  dy="-40" scale-font-size="17,1.15" font-family="monospace"  fill="#000000" stroke="#ffffff" stroke-width="3.5" />
</rule>
<rule e="way" k="instance:lcn" v="3">
<pathText k="name"  font-style="bold" font-size="14"  dy="-60" scale-font-size="17,1.15" font-family="monospace"  fill="#000000" stroke="#ffffff" stroke-width="3.5" />
</rule>
<rule e="way" k="instance:lcn" v="4">
<pathText k="name"  font-style="bold" font-size="14"  dy="-80" scale-font-size="17,1.15" font-family="monospace"  fill="#000000" stroke="#ffffff" stroke-width="3.5" />
</rule>
<rule e="way" k="instance:lcn" v="5">
<pathText k="name"  font-style="bold" font-size="14"  dy="-100" scale-font-size="17,1.15" font-family="monospace"  fill="#000000" stroke="#ffffff" stroke-width="3.5" />
</rule>
</rule>
</rule>
</rule>


Title: Re: Theme developing question
Post by: popej on October 27, 2014, 13:09:53
Quote from: Wojtas82 on October 27, 2014, 13:06:11@ Popej, maybe the solution is to put bike routes in one bag like this "instance:bicycle"?
No problem. Just test a bit current version and then precise your requirements, I'll adopt ;)
Title: Re: Theme developing question
Post by: Wojtas82 on October 27, 2014, 13:12:51
Already done :D
BTW This option is great! Thanks in advance! :)
Title: Re: Theme developing question
Post by: Wojtas82 on October 27, 2014, 22:35:50
Some progress

(http://s16.postimg.org/lik7atvf5/Screenshot_2014_10_27_22_23_21.jpg) (http://postimg.org/image/lik7atvf5/)

(http://s15.postimg.org/wo5vky8vb/Screenshot_2014_10_27_22_23_34.jpg) (http://postimg.org/image/wo5vky8vb/)
Title: Re: Theme developing question
Post by: popej on October 31, 2014, 01:50:58
New version of my map: http://www.gmaptool.eu/en/content/locus-poland-osm

I have changed "instance" tags, now trails are grouped in 4 categories, for each category there is a "instance" tags. New tags are following:
"instance:cycle" for bicycle and mtb trails,
"instance:hiking" for hiking, foot, walking and nordic_walking trails,
"instance:winter" for ski, piste and sled trails,
"instance:other" for other trails like horse trails.

Values for "instance" keys remain the same - "2" to "9" and "x".
Title: Re: Theme developing question
Post by: Wojtas82 on November 03, 2014, 20:56:36
Thanks a lot Popej. I'm a little busy lately but will I will try to find some extra time. :)
Title: Re: Theme developing question
Post by: 0n1y on November 04, 2014, 22:52:46
hmm, is it possible to convert Oruxmaps themes to Locus? Tiramisu 2.0b and SimplyHike 0.98 are just wonderful.
Title: Re: Theme developing question
Post by: Tobias on November 05, 2014, 10:36:14
SimplyHike is made for mapsforge 0.3 which is compatible to Locus as it's the same basis. So converting it is easy - just delete all but one xml-file (the one you want to use) from the theme folder, as Locus only allows one xml per folder. If you want to use several xml files, copy the whole theme folder and rename it, and delete again all but one xml file.
Tiramisu 2.0 Beta is made for Oruxmaps Beta which uses mapsforge 0.4, and maybe Maki has used some stuff which Locus doesn't support. At least the tile resolution is 4 times as much, so it would look different. So you can try the same as for SimplyHike written above, and see how it works.
Title: Re: Theme developing question
Post by: 0n1y on November 06, 2014, 00:27:12
done, both works excellent, thanks for the detailed explanation.
Title: Re: Theme developing question
Post by: Wojtas82 on November 07, 2014, 22:02:15
Hi Locus Team, great job with a new Locus version. I can confirm "dy" fully working - no gaps! Thanks a lot.
Title: Re: Theme developing question
Post by: Menion on November 09, 2014, 22:25:51
perfect, glad to hear :).

Just to inform you ... I did so much updates and improvements to current implementation of MapsForge lib in Locus, that there are no plans to update for later 0.4+ version. If there will be in future any problem with compatibility of themes, feel free to open discussion on this topic. Usually, there is any solution ;)
Title: Re: Theme developing question
Post by: Wojtas82 on November 11, 2014, 14:56:04
Hey. Just a quick question. Is there any way to set gap lengths between "symbol"  icons (not "lineSymbol")?" Dy would be nice as well. I'm trying to configure icons for bike routes. Thanks in advance.
Title: Re: Theme developing question
Post by: voldapet on November 11, 2014, 15:26:07
@Wojtas82
Sorry this is tricky part we didn't solve yet (at least as I can remember). OSM ways are cropped  in Mapsforge format into MetaTiles and we're not able to link the same way on two metatiles. For this reason is complicated to compute the "gap" along specific way.  Do you know if MapsForge 0.4v enables such rules?
Title: Re: Theme developing question
Post by: Wojtas82 on November 12, 2014, 09:22:32
Quote from: voldapet on November 11, 2014, 15:26:07
@Wojtas82
Sorry this is tricky part we didn't solve yet (at least as I can remember). OSM ways are cropped  in Mapsforge format into MetaTiles and we're not able to link the same way on two metatiles. For this reason is complicated to compute the "gap" along specific way.  Do you know if MapsForge 0.4v enables such rules?

Hi
I think these are the attributes supported.
        <xs:complexType name="symbol">
                <xs:attribute name="id" type="xs:string" use="optional" />
                <xs:attribute name="cat" type="xs:string" use="optional" />
                <xs:attribute name="priority" type="xs:integer" use="optional" default="0"/>
                <xs:attribute name="src" type="tns:src" use="required" />
                <xs:attribute name="symbol-scaling" type="tns:scaling" use="optional" default="default"/>
                <xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
                <xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
                <xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
    </xs:complexType>


I can't see dy here.
I would use "lineSymbol" but in Locus the icons keep rotating along ways.
That attribute "rotate" would probably solve this problem? Not sure...
        <xs:complexType name="lineSymbol">
                <xs:attribute name="cat" type="xs:string" use="optional" />
                <xs:attribute name="dy" type="xs:float" use="optional" default="0" />
                <xs:attribute name="src" type="tns:src" use="required" />
                <xs:attribute name="symbol-scaling" type="tns:scaling" use="optional" default="default"/>
                <xs:attribute name="symbol-width" type="xs:positiveInteger" use="optional" />
                <xs:attribute name="symbol-height" type="xs:positiveInteger" use="optional" />
                <xs:attribute name="symbol-percent" type="xs:positiveInteger" use="optional" />
                <xs:attribute name="align-center" type="xs:boolean" use="optional" default="false" />
                <xs:attribute name="priority" type="xs:integer" use="optional" default="0"/>
                <xs:attribute name="repeat" type="xs:boolean" use="optional" default="false" />
                <xs:attribute name="repeat-gap" type="xs:float" use="optional" default="200" />
                <xs:attribute name="repeat-start" type="xs:float" use="optional" default="30" />
                <xs:attribute name="rotate" type="xs:boolean" use="optional" default="true" />
        </xs:complexType>

Title: Re: Theme developing question
Post by: Wojtas82 on November 19, 2014, 23:05:47
Hi,
I was wondering if that would be possible to eliminate this awful line join?
I know it's a cosmetic issue but maybe? :)

(http://s4.postimg.org/moufw3dcp/linejoin.jpg) (http://postimg.org/image/moufw3dcp/)
Title: Re: Theme developing question
Post by: voldapet on November 20, 2014, 09:08:39
@Wojtas82

I'm sorry but this is more complicated for us and we aren't able to solve it at this moment. I can only suggest to try join "blue dotted" path into the one long way.

To your proposal about lineSymbol
Unfortunately locus does not support these parameters. But there is small improvement the "symbol" can contain new parametr symbol-width symbol-height. Interesting is also parametr for "line" curve="cubic"  that renders smooth lines. see http://docs.locusmap.eu/doku.php?id=manual:map_tools:vector_maps_theme_config
Title: Re: Theme developing question
Post by: Wojtas82 on November 20, 2014, 09:13:24
@voldapet
Thanks for the info!
Title: Re: Theme developing question
Post by: john_percy on November 21, 2014, 13:10:18
Quote from: voldapet on November 20, 2014, 09:08:39
But there is small improvement the "symbol" can contain new parametr symbol-width symbol-height....see http://docs.locusmap.eu/doku.php?id=manual:map_tools:vector_maps_theme_config
This is just for Symbol, not lineSymbol? Am I correct?
Title: Re: Theme developing question
Post by: voldapet on November 21, 2014, 15:37:40
Quote from: john_percy
This is just for Symbol, not lineSymbol? Am I correct?
Yes, only for Symbol
Title: Re: Theme developing question
Post by: Wojtas82 on November 22, 2014, 14:46:55
Here's some testing on PC (Bluestacks)
https://www.youtube.com/watch?v=-uh0_9rjQWs&feature=youtu.be (https://www.youtube.com/watch?v=-uh0_9rjQWs&feature=youtu.be)
Title: Re: Theme developing question
Post by: popej on January 20, 2015, 18:16:02
I have cleaned a bit my scripts, that I use for adding marked trails to OSM data and published them on my site,
see file trails-for-locus.7z:
http://www.gmaptool.eu/en/content/locus-poland-osm

I hope someone could find them useful.