Mapsforge 0.5

Started by fzk, December 05, 2014, 13:48:26

0 Members and 1 Guest are viewing this topic.

john_percy

#60
I'll be more than happy if that has solved it but I'm somewhat sceptical. As far as I could see, it was the complexity of symbols that caused them to fail in Locus, as in my example above.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Menion

Give me svg you are worry about and I'll try to make it work. SVG parser is no more mystery for 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
  •  

Tobias

Quote from: menion on May 22, 2015, 21:23:41
I'm now testing your icons to check, what is wrong, and seems they are missing width and height parameters.

I found that too, but there are other issues. Not only complexity (which isn't always fixable with simplify, and some even more complex svgs have no issues), sometimes a missing segment between nodes, and sometimes I have no clue - and have to redraw some parts.

Maybe the problem is with Inkscape vs. Illustrator - all Inscape SVGs render fine with mapsforge 0.5, even complex ones and with missing segments. Locus internal theme SVGs are exported with Illustrator as far as I can see.

Even very simple SVGs are not correctly rendered - example attached. Just a filled blue circle with a grey border, but in Locus it's rendered with a horizontal line. My solution here is to make two circles, grey below, blue above. So yes, it can be solved, but the library seems very picky.
developer of Elevate mapstyle for OpenAndroMaps
  •  

john_percy

#63
When I open Tobias's s_trainstation_lz.svg (from post above) in Inkscape and click on the object, the status bar says "Path 2 nodes in root", but when I use the node tool, there are four nodes. Is that not odd?
After using Simplify, the object tool reads "Path 4 nodes in root". The saved file renders fine in Locus.
I agree however with Tobias that "Simplify" does not solve all the problems with the Locus renderer, even using SVGClean as well.
I notice though that some of Tobias's files won't load into Inkscape (s_kindergarten.svg for example).
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Menion

I never used Inkspace, I use now only offical docs for SVG to understand it's format http://www.w3.org/TR/SVG/ .

Anyway @Tobias, file rendering (circle) fixed. Who is next ;).
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Tobias

Quote from: john_percy on May 23, 2015, 10:11:45
When I open Tobias's s_trainstation_lz.svg (from post above) in Inkscape and click on the object, the status bar says "Path 2 nodes in root", but when I use the node tool, there are four nodes. Is that not odd?
After using Simplify, the object tool reads "Path 4 nodes in root". The saved file renders fine in Locus.
Odd indeed. I made that with Inkscape, so I'm puzzled that it can fix itself by simplify. Seems like simplify also checks for oddities.
QuoteI notice though that some of Tobias's files won't load into Inkscape (s_kindergarten.svg for example).
That's because that was work in progress when I uploaded them and not the source files, I was just testing some SVG clean options if that would help with Locus. Haven't found the right ones yet, that's why I posted here.

Quote from: menion on May 23, 2015, 10:58:06
I never used Inkspace, I use now only offical docs for SVG to understand it's format http://www.w3.org/TR/SVG/ .

Anyway @Tobias, file rendering (circle) fixed. Who is next ;).
Thanks, but maybe it's better if I check every icon that renders wrong and try to fix it. It's probably faster that way, and I'm already at it.
developer of Elevate mapstyle for OpenAndroMaps
  •  

Menion

#66
Hmm generally, this is a bad solution. Solving issues in SVG files, that on other places works correctly, isn't useful solution. Soon or later, you or anyone other, will be stuck on same issue. Best and only solution, is to fix this in Locus! My work, not your ...

So to your compare .. all icons from "ele_res_svg" directory. Old (at moring) and now (after few hours) ;)






EDIT: ah, found small issue in corner of "vulcano". Fixed also.
- 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

#67
Looking at this carefully, funicular, cable car, gondola, fountain, nuclear power, and corners of peak and peak cross still need attention, but otherwise great. Attraction, train station, tram stop should not have a black outline, helipad is not quite right.
;-)
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

Tobias

Quote from: menion on May 23, 2015, 22:31:51
Hmm generally, this is a bad solution. Solving issues in SVG files, that on other places works correctly, isn't useful solution. Soon or later, you or anyone other, will be stuck on same issue. Best and only solution, is to fix this in Locus!

Right, that's why I proposed the different library... haven't thought that it would be so complicated though.
But I also like the idea of having simple and clean SVGs, so maybe that's my personal challenge ;-).

As I got them from various sources, there are various issues. One I introduced myself when I used "convert stroke to path" in Inkscape to make outline contours possible; this sometimes introduces two nodes on the same spot (which can sometimes be solves with simplify), which caused many of the rendering issues. But this seems to be solved.

But many thanks, saves me some trouble and I'm looking forward to the next update!

BTW - I haven't found anything about how "priority" works in Locus themes, so I just kept values from mapsforge 0.5 for now - only integers, negative values have the lowest priority, positive values the highest. At the moment no issues, but does that do the job?

developer of Elevate mapstyle for OpenAndroMaps
  •  

Menion

Hmm thanks mainly John for testing.

I have a problems with "s_cable_car.svg" file. Three small windows are drawn as "path" where only defined parameter is opacity. But in that moment, background is already completely black and I do not understand why web browser draw these windows as grey. Any idea?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Tobias

Quote from: menion on May 25, 2015, 08:27:36
Hmm thanks mainly John for testing.

I have a problems with "s_cable_car.svg" file. Three small windows are drawn as "path" where only defined parameter is opacity. But in that moment, background is already completely black and I do not understand why web browser draw these windows as grey. Any idea?

That's a result of SVG Cleaner which removes not necessary tags etc. It's probably this:
Standard value for fill is fill="#000000", so with the option in SVG Cleaner to remove attributes with standard values, this is removed. The Locus SVG renderer still assumes this value, but doesn't use opacity which is still defined. Other renderers use opacity also on not explicitly defined standard values.
developer of Elevate mapstyle for OpenAndroMaps
  •  

Menion

#71
Nono, it is not this case.

Locus correctly assume black as default color and apply a opacity on this default black color.

Anyway what is usage of black color, when background on which these windows (with transparent black color) is already fully black


Ah back. Before this semitransparent black is draw, there is also drawn a white background. I missed this. Fine ... so next try to fix it ...

EDIT: fixed

If you find any other icon incorrectly rendered, write me it's name. Of if anyone will wants to check if any SVG files are correctly rendered, just give me a directory with SVG files and I'll render same images directly over Locus.


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

jusc

Quote from: menion on May 25, 2015, 10:29:22

If you find any other icon incorrectly rendered, write me it's name. Of if anyone will wants to check if any SVG files are correctly rendered, just give me a directory with SVG files and I'll render same images directly over Locus.

Can you please try this one?
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
  •  

john_percy

Train station and tram stop still have an incorrect black outline and fountain is also still wrong. The problem with fountain is that the right hand side of the drawing is a clone of the left hand side. I don't know if clones are allowed in simple svg.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •