Author Topic: Colour coded bicycle routes  (Read 13609 times)

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #15 on: June 13, 2014, 12:17:10 »
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?
« Last Edit: June 13, 2014, 14:24:27 by Wojtas82 »
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 495
  • Thanked: 12 times
    • View Profile
Re: Colour coded bicycle routes
« Reply #16 on: June 13, 2014, 14:49:44 »
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.
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #17 on: June 13, 2014, 14:53:36 »
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.
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 807
  • Thanked: 121 times
    • View Profile
  • Device: MotoG
Re: Colour coded bicycle routes
« Reply #18 on: June 15, 2014, 00:20:15 »
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.
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #19 on: June 16, 2014, 18:09:46 »
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 :)
« Last Edit: June 16, 2014, 23:38:11 by gynta »
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1895
  • Thanked: 20 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Colour coded bicycle routes
« Reply #20 on: June 16, 2014, 20:26:33 »
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.
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #21 on: June 17, 2014, 15:12:04 »
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?
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 495
  • Thanked: 12 times
    • View Profile
Re: Colour coded bicycle routes
« Reply #22 on: June 17, 2014, 16:15:02 »
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.
 

Offline popej

  • More than Newbie
  • *
  • Posts: 39
    • View Profile
    • GMapTool
Re: Colour coded bicycle routes
« Reply #23 on: June 17, 2014, 21:25:13 »
Your guess is right, I put route name into tag "ref" on map that I post at gmaptool.eu.
popej
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 807
  • Thanked: 121 times
    • View Profile
  • Device: MotoG
Re: Colour coded bicycle routes
« Reply #24 on: June 18, 2014, 10:13:48 »
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> 
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #25 on: June 18, 2014, 12:59:55 »
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.
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1895
  • Thanked: 20 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Colour coded bicycle routes
« Reply #26 on: June 18, 2014, 13:50:13 »
yes, try <pathText k="......  " dy="40" ....... reduce 40 to your value,  if neccessary
« Last Edit: June 18, 2014, 13:51:48 by jusc »
Regards J.
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #27 on: June 18, 2014, 13:57:34 »
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"
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 807
  • Thanked: 121 times
    • View Profile
  • Device: MotoG
Re: Colour coded bicycle routes
« Reply #28 on: June 18, 2014, 16:09:00 »
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>
« Last Edit: June 18, 2014, 17:15:43 by john_percy »
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #29 on: June 20, 2014, 14:31:43 »
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