[VTM] Map Style Remove Borderlines

19 views
Skip to first unread message

jvoyatz

unread,
May 26, 2021, 5:08:58 AMMay 26
to Mapsforge & VTM

Hello,

I need to remove the borderlines as they are being shown in the attached picture.

I have read this post and also this and now i am able to load a render theme from assets.

However, I would like to ask whether it is possible to only a create a rule to remove the borderlines or do i need to manually create a new render theme to show all the items on the maps as it happens in the default theme styles?
SmartSelect_20210526-103544_ENGAGE Mobile.jpg

Emux

unread,
May 26, 2021, 5:47:02 AMMay 26
to mapsfo...@googlegroups.com
To modify a render theme, you need to create a copy and change it.

The borders are probably here.

--
Emux

jvoyatz

unread,
May 26, 2021, 5:51:29 AMMay 26
to Mapsforge & VTM
Thanks! I am dealing with this at the moment.

However i am getting this exception,

...org.oscim.theme.IRenderTheme$ThemeException: missing attribute src for element: symbol...


I have copied the default xml style into a custom file created and i am trying to use this theme when showing this map, but it shows me this exception.

Emux

unread,
May 26, 2021, 5:52:55 AMMay 26
to mapsfo...@googlegroups.com
> However i am getting this exception

You have an error in the theme xml.

You could use some modern xml editor with schema validation while editing.

--
Emux

jvoyatz

unread,
May 26, 2021, 6:03:34 AMMay 26
to Mapsforge & VTM
On Wednesday, May 26, 2021 at 12:52:55 PM UTC+3 Emux wrote:
> However i am getting this exception

You have an error in the theme xml.
I don't think that i am having an error, since i 've copied this file https://github.com/mapsforge/vtm/blob/master/vtm-themes/resources/assets/vtm/default.xml.
Probably it will be an error with the <rendertheme> tag, i can't say for sure.

Emux

unread,
May 26, 2021, 6:09:06 AMMay 26
to mapsfo...@googlegroups.com
If I download locally the xml file and open it with a map, it works correctly:

https://raw.githubusercontent.com/mapsforge/vtm/master/vtm-themes/resources/assets/vtm/default.xml


If you use an old VTM version, download an older default theme:

https://raw.githubusercontent.com/mapsforge/vtm/0.15.0/vtm-themes/resources/assets/vtm/default.xml


Make sure you modify correctly the xml, with proper encoding, etc.

--
Emux

jvoyatz

unread,
May 26, 2021, 6:17:22 AMMay 26
to Mapsforge & VTM
I am using the latest version.
I will try to clean my project and invalidate the Android Studio cache.

Thanks again!

Karsten T.

unread,
May 26, 2021, 7:22:27 AMMay 26
to Mapsforge & VTM
there is also the possibility to edit Rules via a RuleVisitor, see this discussion for more information. Using the RuleVisitor i was able to stick to the normal theme and edit only the one Rule i needed to change

jvoyatz

unread,
May 26, 2021, 7:38:01 AMMay 26
to Mapsforge & VTM
Hello,

Thanks for your suggestion, it really seems a nice solution.

You are probably mentioning to this example : ThemeStylerActivity
Reply all
Reply to author
Forward
0 new messages