Main Menu
Menu

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.

Show posts Menu

Messages - TrulloF

#16
Quote from: john_percy on May 20, 2023, 10:58:59
Quote from: TrulloF on May 20, 2023, 10:33:30Offline LoPoints still don't respect theme definitions and always overlay icon definitions in v4 themes with Locus default icons. That's true for all themes like Voluntary and other custom themes. With v3 maps the behaviour is different in the way that offline  LoPoints are depicted as defined by the theme and not as extra overlay.
I believe there is a possibility that @Menion will open up the icon theme in the future, which would allow third party themes to style the poi icons as previously.

Sent from my moto g(6) plus using Tapatalk


That would be great. As a temporary fix I commented out most icons in my own theme...
#17
Offline LoPoints still don't respect theme definitions and always overlay icon definitions in v4 themes with Locus default icons. That's true for all themes like Voluntary and other custom themes. With v3 maps the behaviour is different in the way that offline  LoPoints are depicted as defined by the theme and not as extra overlay.
#18
Quote from: Menion on May 15, 2023, 14:33:59@TrulloF
I'm a little lost here. The first screenshot is a new LoMap with offline LoPoints? Where these icons are from? :). Looks like your own personal points.
First Screenshot is a v3 Lomap with LoPoints (offline activated). 2nd screenshot is a v4 LoMap also with LoPoints (offline) activated. No personal points involved. In v4 my themed points (png) get overlaid by svg LoPoints, where it should look like in the first screenshot with v3. Is this more clear now?
#19
Quote from: michaelbechtold on May 14, 2023, 21:49:19Navigation shows a failure: the distance to next turn freezes at its initial value, while the voice announcements adapt to the nearing turn.
You can re-calculate, and the story just repeats.
Running latest Beta
I can confirm this bug in latest beta.
#20
Hello, if I activate offline points v4 maps show standard icons above the theme defined ones. V3 maps show the icons as intended (see attached screen shots). I remember v3 had similar problems, but it got fixed. Would be nice to have the old behavior back. Thanks.
#21
Other features / Re: Online search
May 10, 2023, 13:30:38
I think the new search function is a big improvement. I always grieved about the loss of GooglePlaces search, but with this solution it's quite comfortable to search for bakeries and stuff.
#22
Quote from: voldapet on May 08, 2023, 21:30:09@TrulloF
We published the python script that can help with the conversion theme from "Custom Locus V3" style to official Mapsforge V4
https://github.com/asamm/lomaps-mapsforge/tree/main/theme-v3-to-v4-converter
The conversion is not 1:1 but it can help to remove not supported attributes or convert DP units to "pixels" in V4
Needed to install some additional modules (e.g. lxml), but then conversion worked without a problem. There are several typos in the readme, but it wasn't to hard to figure them out  ;).
#23
Quote from: voldapet on May 08, 2023, 21:30:09@TrulloF
We published the python script that can help with the conversion theme from "Custom Locus V3" style to official Mapsforge V4
https://github.com/asamm/lomaps-mapsforge/tree/main/theme-v3-to-v4-converter
The conversion is not 1:1 but it can help to remove not supported attributes or convert DP units to "pixels" in V4
Did most of it by hand in the meantime  :), but thanks for sharing.
#24
Quote from: Andrew Heard on May 09, 2023, 18:04:46
Quote from: TrulloF on May 09, 2023, 08:22:55I get lots of crashes in connection with point/track menu
very similar to me ;-(

PS. quick test - appears fixed in 4.16.0.3
Yes, seems to be fixed now. Great!
#25
I get lots of crashes in connection with point/track menu. If I chose a point and try to start navigation/guiding then it crashes. If I choose the same point from the map, it works. I get also crashes if I push the center on point button in point screen. Pretty unusable for me in this state...
#26
Quote from: voldapet on May 02, 2023, 21:23:37Well, I could provide the whole python script that was used for conversion from V3 to V4... if you are familiar with python.
That would be great! Thank you in advance for sharing.
#27
Quote from: voldapet on May 02, 2023, 08:38:03It seems I used several formulas based on the type of attribute. Is it possible for you to understand the following python code? (if not I can translate to the "human language" :)
I think I adjusted some values manually afterward anyway.

Code (python) Select
def process_dp_unit(soup):
    """"
    Remove the 'dp' units and re-compute the offset to pixels
    :param soup:
    """
    # simple remove dp for following without any computation
    attr_to_remove_dp = ['stroke-width', 'repeat-gap', 'r']
    for attr in attr_to_remove_dp:
        for tag in soup.select('[{}]'.format(attr)):
            value = tag[attr].replace('dp', '')
            tag[attr] = value

    # remove dp and round to int because symbol-with
    for tag in soup.select('[symbol-width]'):
        value_float = float(tag['symbol-width'].replace('dp', ''))
        tag['symbol-width'] = round(value_float * 1.5)
        #tag['symbol-width'] = 20

    # remove dp and resize dp at path-text
    for tag in soup.select('[font-size]'):
        value_float = float(tag['font-size'].replace('dp', ''))
        tag['font-size'] = round(1.4 * value_float)


def process_dy(soup):
    """"
    Remove the 'dp' units and re-compute the offset to pixels for dy attribute
    :param soup:
    """
    for tag in soup.select('[dy]'):
        value = tag['dy']
        if tag.name == 'line' or tag.name == 'pathText' or tag.name == 'lineSymbol':
            if 'dp' in value:
                value = float(value.replace('dp', ''))
                value = value / 4.3  #
                tag['dy'] = round(value, 1)

        if tag.name == 'caption':
            tag['dy'] = value.replace('dp', '')

        if tag.name == 'symbol':
            del tag['dy']
            tag['position'] = "above"

I'll have a look at it. Thanks. Seems to be a lot of effort anyway  :)
#28
Is there a formula to "translate" dp values to new numerics?
#29
Quote from: voldapet on May 01, 2023, 19:19:26@TrulloF
as mentioned above LoMaps V4 uses official Mapsforge renderer and it's needed to remove all tags that are not supported by Mapsforge.

I downloaded your theme and fixed some small issues like 'priority' in rule tag, 'repeat' can not be used for symbol, 'color' for symbol and 'country' attribute used for subways. I commented the subways section so please replace it with the symbol you want to use for subways
(the "fixed" theme in the attachment)
Thank you so much! It works and now I just need to adjust some stuff. You are my hero! Thank you for your efforts.
#30
Quote from: Menion on May 01, 2023, 08:33:27You may also share a theme-in-progress with me, I'll check if the app throws any errors in the background if you want.
Here you can find the theme. Adlerauge_v4.xml is the theme in question. Thank you in advance. https://1drv.ms/u/s!Av_dQw47TbThg7Z4aMWVjiWQkJdOIw?e=bkwbt3