Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - SwissPoPo

Pages: [1]
Themes - Vector maps / Issue with SVG as area pattern
« on: March 14, 2016, 22:06:46 »
In my theme I use SVG as area pattern.
The SVG has an original size of 580x580. The theme downscales it to 26dp.
On some devices locus draws a line at the bottom from outside of the frame. The effect seems to be pixel density dependent: seen on 160 & 320 dpi devices (not on 240 & 480).
I have created a test pattern. It has the size of 580x580. Outside of this frame I added a rectangle in red & purple (starting at coordinate -22, -22 size 624x624). I should not be visible. But it is. One line at the bottom (purple).
For SVG symbols this is not an issue. For SVG pattern this looks bad. (horizontal lines).

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="" xmlns="" height="580" width="580" version="1.1" xmlns:cc="" xmlns:dc="">
 <path d="m-22.308-22.308h624.62v624.62h-624.62z" fill="#f00"/>
 <path d="m0 0h580v580h-580z" fill="#0f0"/>
 <path d="m22.308 22.308h535.38v535.38h-535.38z" fill="#00f"/>
 <path d="m44.615 44.615h490.77v490.77h-490.77z" fill="#0f0"/>
 <path fill="#c400ff" d="m-22.308 580h624.62v22.308h-624.62z" fill-rule="evenodd"/>

testpattern.xml (theme)
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<rendertheme xmlns="" xmlns:xsi="" xsi:schemaLocation=" ../renderTheme.xsd" locus-extended="1" fill-sea-areas="0" version="1" map-background="#e6e6e6">
  <rule e="way" k="natural|landuse" v="forest_huge|forest_large|forest_medium|forest_small|forest_tiny|forest_micro|forest_nano|forest|wood" closed="yes">
    <area src="file:/testpattern.svg" symbol-width="26dp" />

Themes - Vector maps / dpi independent map/theme
« on: July 12, 2015, 12:26:47 »
Is there a way to create a dpi independent map/theme?

The mapsforge-maps in Locus looks different on every device. I can define some dpi dependent scale in the theme (adding dp to the value). It works but it produce an unusable view on higher dpi devices, because the map itself does not scale.

How can I create a theme which looks on every device identical? A have only found a solution which I am not happy with it: Remove all dpi scaling features from the theme and manual configure "Settings > Map - advanced > Change map resolution: Enable; and Set resolution: 2x or higher".
Disadvantage: Manual user task, Bitmap Scaling even for fonts or svg. It looks ugly.

Could the dpi dependent scaling of the whole map added as option to the theme?
Is there a solution where I have not yet discovered?

Some pictures:


I have tested the line stroke-width with and without dp.
With 160dpi I don't expect any difference. And yes, everything looks fine.
With 240dpi the streets are scaled with the dp parameter. But it look ugly because the map itself isn't scaled. On 320 or 480dpi devices you won't see any details from the round about. I expect a smaller map view/extract. The android and locus Interface are scaled.

Remark: These screenshots have all the same resolution but on a hardware device the 240dpi pictures are much smaller.

Pages: [1]