internal theme hiking --> cliff

Started by Hedaja, January 11, 2014, 01:51:16

0 Members and 2 Guests are viewing this topic.

Hedaja

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
  •  

voldapet

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

Hedaja

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?

  •  

jusc

Quote from: voldapet 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"

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


Regards J.
  •  

Menion

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

voldapet

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

Hedaja

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

jusc

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

Menion

another good idea with "one way road". You guys never stop surprise me :)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

john_percy

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

voldapet

Quote from: menion on January 12, 2014, 20:32:43
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"  :-)
  •