Author Topic: internal theme hiking --> cliff  (Read 3696 times)

Offline Hedaja

  • Newbie
  • *
  • Posts: 9
    • View Profile
internal theme hiking --> cliff
« on: January 11, 2014, 01:51:16 »
Hi
I'm using the Elevate theme from openandromaps but i wanted to change the look how cliffs get rendered. I used lineSymbol to insert a custom made png but it only gets displayed with huge gaps along the way.
When i took a look at other themes i saw that the internal hiking theme uses an interesting way to render cliffs. I wanted to take a look inside but I couldn't find it.
Is it possible to get a hint on how you made it?

greetings
Christian
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 484
  • Thanked: 10 times
    • View Profile
Re: internal theme hiking --> cliff
« Reply #1 on: January 11, 2014, 09:42:03 »
Hi,
here is used one of improvment of Mapsforge library for Locus. For line symbol you can use attributes: repeat="true"  repeat-gap="0dp"
In internal themes:
<rule e="way" k="natural" v="cliff" zoom-min="14">
    <line stroke="#80CCA78B" stroke-width="0.35" />
    <lineSymbol src="path_to_cliff_png"  dx="0" repeat="true"  repeat-gap="0dp"  scale-icon-size="15,1.2" />
</rule>
 

Offline Hedaja

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: internal theme hiking --> cliff
« Reply #2 on: January 11, 2014, 12:04:34 »
thank you very much
this is how my modified cliffs look like

I still have one problem: Is it possible to render the symbol on the other side of the line?
it isn't 100% satisfying (small white gaps between png's and bigger gaps if there isn't enough space) but I think it is the best you can achieve at the moment.
One more question. I made the width of my png smaller to have less of these big gaps. Could the rendering performance be reduce if I make it too small and there are too many line symbols to be rendered?

 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1896
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: internal theme hiking --> cliff
« Reply #3 on: January 11, 2014, 14:51:50 »
Hi,
here is used one of improvment of Mapsforge library for Locus. For line symbol you can use attributes: repeat="true"  repeat-gap="0dp"

You make my day.  :D Thank you, that´s what I looked for.


Regards J.
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11352
  • Thanked: 292 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: internal theme hiking --> cliff
« Reply #4 on: January 11, 2014, 15:11:01 »
nice ;)
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 484
  • Thanked: 10 times
    • View Profile
Re: internal theme hiking --> cliff
« Reply #5 on: January 12, 2014, 10:01:43 »
@Hedaja
You can try to use align-center=true or change the image itself.
White gaps - sorry no way.
Performance - maybe question for menion.  I thing that render uses repeatedly the same image matrix so it shouldn't be problem
« Last Edit: January 12, 2014, 20:00:15 by voldapet »
 

Offline Hedaja

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: internal theme hiking --> cliff
« Reply #6 on: January 12, 2014, 12:07:21 »
thanks
unfortunately align-center doesn't work as i hoped. I doubled the height of my icon and started the colour form the middle. But the middle doesn't seem to allways be rendered on the line (small variations in both directions)
I'm going do it the way jusc did it with the traditional cliff icon.
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1896
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: internal theme hiking --> cliff
« Reply #7 on: January 12, 2014, 16:48:53 »
Hi Hedaja,

with my latest themes I´m only working with SVG´s (scalable vector graphics). There are no pngs even in /patterns.
It seems that the symbol (SVG) starts on top while the map is rendered.
To get a view like in my first post (look above) where the triangle peak shows to the sea and not to the middle of the island, I had to create something lke this:


The red arrow shows the start,

btw the mapsforge library improvement ( repeat="true"  repeat-gap="0dp" ) is usefull for the oneway arrows too. The repeat-gap should be a bit increasad of course.


Regards J.
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11352
  • Thanked: 292 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: internal theme hiking --> cliff
« Reply #8 on: January 12, 2014, 20:32:43 »
another good idea with "one way road". You guys never stop surprise me :)
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 659
  • Thanked: 93 times
    • View Profile
  • Device: MotoG
Re: internal theme hiking --> cliff
« Reply #9 on: January 13, 2014, 11:50:08 »
Very helpful.
From my experiments with one-way markers, align-center seems to work correctly with svg's, but not on scaled png's. I suspect the offset applied to centre the image doesn't allow for the increased size of the image.
I find using only svg's has an unacceptable performance hit on older phones, like my HTC Desire S, so I'm working on using svg's only when really needed.
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 484
  • Thanked: 10 times
    • View Profile
Re: internal theme hiking --> cliff
« Reply #10 on: January 13, 2014, 11:57:04 »
another good idea with "one way road". You guys never stop surprise me :)
If I remember correctly one-way roads were the reason we (you) implemented the "repeat-gap"  :-)