Theme developing question

Started by jusc, May 11, 2014, 17:12:00

0 Members and 3 Guests are viewing this topic.

jusc

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?


Regards J.
  •  

Menion

#1
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.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

jusc

@menion,
Ok, thank you for answering.
Regards J.
  •  

Wojtas82

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.
  •  

john_percy

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.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Wojtas82

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
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.
  •  

john_percy

#6
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" />

Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

popej

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.
popej
  •  

john_percy

[offtopic]waw.pl is blocked on my system. I don't know what else is hosted there.[/offtopic]
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Wojtas82

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

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.
  •  

jusc

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.
Regards J.
  •  

Menion

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).
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

jusc

@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".


Regards J.
  •  

voldapet

@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
  •  

jusc

#14
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...
Regards J.
  •