Colour coded bicycle routes

Started by Wojtas82, June 11, 2014, 11:23:59

0 Members and 2 Guests are viewing this topic.

Wojtas82

#15
Ok, I will create a theme based on network just for tests. I was wondering how often is the map refreshed? I downloaded one from Locus Store and it's dated in March...Is it possible to refresh it somehow? Or this is made only by Locus Team?

EDIT:
I tried this combination but it didn't work:

<rule e="way" k="name" v="*EuroVelo 10*" zoom-min="14">
            <lineSymbol src="file:/symbols/EuroVelo10.svg"  />
         </rule>

Is it possible to use that kind of rule to extract part of text from relations name?
  •  

voldapet

Hi Guys,
OK I'll add colour tags into Locus Poland vector map. We're in the beginning of generation process so I guess that maps will be available until end of June.
  •  

Wojtas82

Great! Is it possible to generate a small region by myself so I can make testing? Some bicycle routes are still missing colours so I want to fix everything to make it look nice and smooth.
  •  

john_percy

Quote from: Wojtas82 on June 13, 2014, 12:17:10
I tried this combination but it didn't work:

<rule e="way" k="name" v="*EuroVelo 10*" zoom-min="14">
            <lineSymbol src="file:/symbols/EuroVelo10.svg"  />
         </rule>
Is it possible to use that kind of rule to extract part of text from relations name?
No it's not. There's no smart matching. Values have to be literals, "*" [all] or "~" [none]."|" is allowed for OR.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Wojtas82

#19
Ok, so I "made" a profile which renders bicycle routes in specific colours.
Actually I edited few other themes, copy pasted here and there and here we are :)
There are NO hiking routes in this profile. It is bicycle specific. If you want hiking routes switch to different profile.
At small zoom you can see network specification (icn,nsn and rcn)
At high zoom you can see coloured routes according to colour=* tag.

I have a problem with displaying a ref tag. For example, I tried to display ref from icn network - the name:en=* tag is displayed instead. It takes lots of screen because the name is long, and the ref is correct, I chceck in JOSM.I don't know how to solve this yet.


Actually it only works with the map from this website:

http://www.gmaptool.eu/pl/content/locus-polska-osm


       

and the profile, just for tests...it's not finished yet!
I'm a newbie so please be patient :)
  •  

jusc

Ref tag :
You should use.... k="network" v="icn" instead of k="osmc_colour"...
I use the Locus Store map and it looks nice. :)
And the sea should have blue colour.
Regards J.
  •  

Wojtas82

I actually use this
<rule e="way" k="network" v="icn|ncn|rcn|lcn" zoom-min="17">
   <caption k="ref" font-style="bold" font-size="13" fill="#FFFFFF" scale-font-size="11,1.1"
            bg-rect-fill="#0026ff" bg-rect-stroke="#FFFFFF" bg-rect-over="3" bg-rect-stroke-width="2" bg-rect-rounded="4" />
    </rule>   

That's weird, on the map I posted earlier I see names and on the original locus map I see refrences. I wonder what is it causing?
  •  

voldapet

Quote from: Wojtas82 on June 17, 2014, 15:12:04
That's weird, on the map I posted earlier I see names and on the original locus map I see refrences. I wonder what is it causing?
It depends how the autor of http://www.gmaptool.eu/pl/content/locus-polska-osm maps handle the OSM tags during generation of mapsforge map. I only guess that he probably set new value into REF tag.
  •  

popej

Your guess is right, I put route name into tag "ref" on map that I post at gmaptool.eu.
popej
  •  

john_percy

Quote from: Wojtas82 on June 16, 2014, 18:09:46
I have a problem with displaying a ref tag. For example, I tried to display ref from icn network - the name:en=* tag is displayed instead. It takes lots of screen because the name is long, and the ref is correct, I chceck in JOSM.I don't know how to solve this yet.
If the text of the ref is typically too long, why not display it as a pathtext rather than a caption?
<rule e="way" k="network" v="icn|ncn|rcn|lcn" zoom-min="17">
<pathText k="ref" font-style="bold" font-size="13" scale-font-size="11,1.1" fill="#606060" stroke="#FFFFFF" stroke-width="2" />
</rule> 
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Wojtas82

Thanks John,
This works ok but only at high zoom (on my map names become visible at level19). I would like to see REF at, lets say, 13-15 and names over paths at 15-21.
My other question is:
Is it possible to move pathtext away from path? Let's say few pixels up from path. Right now the name's, even that they are visible, they display right above paths....
cheers.
  •  

jusc

#26
yes, try <pathText k="......  " dy="40" ....... reduce 40 to your value,  if neccessary
Regards J.
  •  

Wojtas82

Quote from: jusc on June 18, 2014, 13:50:13
yes, try <pathText k="......  " dy="40" ....... reduce 40 to your value,  if neccessary
Thanks a lot, that's working fine with pathText. I set it up dy=-20"
  •  

john_percy

#28
Quote from: Wojtas82 on June 18, 2014, 12:59:55
I would like to see REF at, lets say, 13-15 and names over paths at 15-21.
Try this (which has ref along the path at 13-18 and name along the path and ref as a boxed caption at zoom 19 and bigger):
<rule e="way" k="network" v="icn|ncn|rcn|lcn">
     <rule e="any" k="*" v="*" zoom-min="13" zoom-max="18">
          <pathText k="ref" font-style="bold" font-size="13" scale-font-size="11,1.1" fill="#606060" stroke="#FFFFFF" stroke-dy="-20" width="2" />
     </rule>
     <rule e="any" k="*" v="*" zoom-min="19">
          <pathText k="name" font-style="bold" font-size="13" scale-font-size="11,1.1" fill="#606060" stroke="#FFFFFF" stroke-dy="-20" width="2" />
         <caption k="ref" font-style="bold" font-size="13" fill="#FFFFFF" scale-font-size="11,1.1" bg-rect-fill="#0026ff" bg-rect-stroke="#FFFFFF" bg-rect-over="3" bg-rect-stroke-width="2" bg-rect-rounded="4" />
     </rule>
</rule>
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Wojtas82

Quote from: john_percy on June 18, 2014, 16:09:00
Quote from: Wojtas82 on June 18, 2014, 12:59:55
I would like to see REF at, lets say, 13-15 and names over paths at 15-21.
Try this (which has ref along the path at 13-18 and name along the path and ref as a boxed caption at zoom 19 and bigger):
<rule e="way" k="network" v="icn|ncn|rcn|lcn">
     <rule e="any" k="*" v="*" zoom-min="13" zoom-max="18">
          <pathText k="ref" font-style="bold" font-size="13" scale-font-size="11,1.1" fill="#606060" stroke="#FFFFFF" stroke-dy="-20" width="2" />
     </rule>
     <rule e="any" k="*" v="*" zoom-min="19">
          <pathText k="name" font-style="bold" font-size="13" scale-font-size="11,1.1" fill="#606060" stroke="#FFFFFF" stroke-dy="-20" width="2" />
         <caption k="ref" font-style="bold" font-size="13" fill="#FFFFFF" scale-font-size="11,1.1" bg-rect-fill="#0026ff" bg-rect-stroke="#FFFFFF" bg-rect-over="3" bg-rect-stroke-width="2" bg-rect-rounded="4" />
     </rule>
</rule>

Thanks a lot John, that helped me a lot! I have modified the rule you posted and implemented it into new themes (I'm working on Hiking and Cycling Themes form Poland). Still working on it, I will post them as soon as I solve all coresponding problems.

Right now I'm struggling with possibility of displaying paths containing tag :
highway=path
bicycle=designated (and similar)

Is that possible? :)
Thanks a lot in advance! :)
Wojtas
  •