Scaling of svg's in Themes ?

Started by kech61, February 02, 2016, 14:08:06

0 Members and 1 Guest are viewing this topic.

kech61

Hi,

I'v tried to scale Icons (svg's) with the OAM Elevate Theme.
There is an option at settings > Map - ojects & style > Map icon size
However it does not work with the Elevate Theme

and under settings > Map advanced > Vector Maps there is only an option for Text size

Is there a way to scale svg-icons in Custom Themes?

Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

voldapet

Hello Christian,

there is several possibilities how to scale icons:
- parameter scale
<symbol src="file:/symbols/police.svg"  scale="0.6" />

-parameter symbol-width or symbol-height that rescale icon on specific size
<symbol src="file:/symbols/police.svg" symbol-width="10dp"  />

-  parameter scale-icon-size=<start_zoom_level, scale_factor" It's quite usable. It says that specific icon will be rescaled from defined zoom-level in specified scale factor
<symbol src="file:/symbols/police.svg" scale-icon-size="16,1.1"  />

Detailed description of mentioned parameters http://docs.locusmap.eu/doku.php?id=manual:advanced:map_tools:theming
  •  

kech61

#2
Hello Petr,

Thanks for detailed answer.
However - I'm sorry that my question was not specific enough.

What I meant: I want to adjust the Icon size according to the screen resolution, so bigger Icons for HighRes and smaller for LowRes-Displays. We already deliver different themes for this and want to reduce this to one theme for all screen resolutions.

And even on displays with same resolution some people prefer bigger, some smaller icons.
So it would be great to have an option to change Icon-Size from within the Locus

Best regards/ Grüsse
Christian
www.openandromaps.org
  •  

jusc

Hello Christian,

I believe, there is no option today. I do this at the moment with a perl script outside of Locus. It replaces all "scale="?.?" to scale="?.? + ?%" or any value you type.
for example scale="0.6"  +10% will be set to scale="0.66" 
Regards J.
  •  

john_percy

#4
A few points to add:
1. Locus offers resolution-independent scaling for symbols in themes already, if one defines the height in "dp" units, for example:
symbol-height="14dp" scale-icon-size="16,1.25"
This sets the height of the symbol in resolution-independent units, and then scales the symbol by a factor of 1.25 for every zoom level above 16.
The dp notation can also be done for widths of lines etc. I have done this in my Voluntary theme.

2. Overall adjustment of the scaling of the map can be used to adjust for individual preferences, using Settings | Map - advanced | Miscellaneous: Increase map resolution. The obvious drawback of this is that it also increases the width of roads and size of text, although the text size can be fine-tuned in Settings | Map - advanced | Vector maps: Text size. However...

3. Even though the map has been upscaled, Locus does not scale the POI overlay symbols for points from its (beta) database and a standard size symbol overlays a bigger one, which is unnecessarily ugly. Request to menion: please sort this!

4. It would be much easier if there was an option in Map-advanced to set a scale for symbols on vector maps. Orux maps does it. It's not the first time someone has asked about this. Request to menion: please add this feature.

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

john_percy

Just to say, I now find  I can scale the overlay symbols by scaling map icons etc to 130% in settings (it goes up in 10% increments), but the nearest map resolution scaling I can get is 125% (it goes up in 25% increments). That works well enough for me but it would be nice to be able to get them both exactly the same.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •