Editing theme in desktop

Started by rucativava, August 17, 2021, 00:45:50

0 Members and 1 Guest are viewing this topic.

rucativava

I have developed in the past a rendertheme for Orux using Cruiser as a desktop previewing tool. I am now creating a new theme for LoMaps, and it seems Cruiser is not able to handle specific locus attributes as well as dp units.
Is there anyway to use the computer to edit the XML file and quickly previewing the result?
  •  

Menion

Hello, I'm worried there is no such tool for the desktop. Anyway, it is maybe a good question to people who create map themes about their best practices of editing ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

voldapet

Hi, I develop the internal Locus themes. I also think that there is no desktop SW that supports custom Locus tags. I always preview the changes directly on the phone or emulator.
I can suggest TotalCommander with ADB plugin to quickly copy XML file to the device.
  •  

john_percy

Like @voldapet I use Total Commander but with TotalDrip to access Dropbox in order to transfer the files and test on line.
I also use QuickEdit to edit online within Android and Notepad+ to edit the XML files in the Dropbox folder in Windows.
I found that quicker and less frustrating than using an emulator, and easier than ADB when I changed my phone.

Sent from my moto g(6) plus using Tapatalk

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

karlchick

I use Notepad+ with a plugin to select rgb colour codes. Transfer to phone using double commander for live testing in app.
User id: 62b600722
Author of the OS Map Theme:
DiscussDownload
  •  

Tapio

#5
I use MS Visual Studio Codium on Windows and TC (+its SMB plugin)/QuickEdit on Smartphone end.
Tapiola MFV4+ theme for OAM Maps:
Discuss - Releases - DL latest - Install latest
  •  

Tapio

Guys I just remembered RouteConverter can show OSM maps and themes. I've just checked OAM v5 and Voluntary theme, it works, see lovely screenshot. Seems like a good way to test themes.

Stuff for this application goes into default dir "%userprofile%\.routeconverter\" - paths can be changed in options.

https://www.routeconverter.com/home/en

Tapiola MFV4+ theme for OAM Maps:
Discuss - Releases - DL latest - Install latest

karlchick

Quote from: tapio on January 04, 2022, 16:17:38
Guys I just remembered RouteConverter can show OSM maps and themes. I've just checked OAM v5 and Voluntary theme, it works, see lovely screenshot. Seems like a good way to test themes.

Thanks for this, I tried it and it works (no install too). Only issue is that it ignores categories and displays all overlay options in the theme - which can make for a rather cluttered display. Does anyone know if the app can apply/select overlays/categories?
User id: 62b600722
Author of the OS Map Theme:
DiscussDownload
  •  

T-mo

I currently use:

xml editing per Notepad++.

a quick and easy wireless-transfer to smartphone can be realised via syncthing.
I use Catfriend1's releases on Android https://github.com/Catfriend1/syncthing-android and on Windows https://github.com/canton7/SyncTrayzor for any of my transfers.
After connecting the relevant folders (e.g. share Locus/mapsVector/_themes/XYZ_Theme on syncthing-android and accept on syncthing-windows, then point to your local XYZ_Theme-dev-sync-folder) both get synced. Synchting typically watches for changes, you don't need to interact, you can also set intervalls individually though not needed. Better work with a dedicated folder and have your xml backed up for the intial setup, though conflicts typically gets prompted.

Edit and save xml in Notepad++, the change gets automatically detected and syncing is triggered within 1-5 seconds, or manually trigger by hitting 'rescan' in SyncTrayzor if you need your 1s.
Then simply rechoose your theme in Locus, voila 8)
  •  

Menion

Maybe a @voldapet may share his fine-tuned method to edit LoMaps themes  ;)
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

voldapet

Internal themes for LoMaps are tested/developed directly in Locus. Previously I used to manually copy the theme .xml via Total Commander to the device and restore the theme in the app. It's not bad, but it's not ideal. As you probably know, LoMaps will finally be in V4 and will use the default Mapsforge renderer. When we started working on LoMaps V4, I had two thoughts about how to improve the theme development process:
- usage of variables in the theme
- quick refresh the theme on a mobile device.   

For this reason we prepared a simple python tool that solves mentioned issues. It basically copies and refresh the theme on the device in one click - available at https://github.com/asamm/lomaps-mapsforge 

The process of generation of theme file is the following:
1. Base template
On the input is theme template that contains variables and definitions for custom actions. This is basically a mapsforge theme but some colors or widths are defined using variables
2. Template config
It assigns values to theme variables
3. Generation of result theme file
The theme generator combines template variables to generate the final theme file
4. Copy the theme to the device and refresh the theme

There are several requirements (intall adb, python and some other python modules) and it may be complicated to run the script at this moment. Moreover it also automatically generates a theme for POIs so it is quite focused on internal LoMaps themes and is not as configurable as it could be.
But if anybody would like to use it to develop alternative themes, it is possible to make the generator more generic. Maybe it would be enough to prepare the settings to generate also POI themes and maybe a better installation...

Please let me know if anyone is interested and I can tweak it a bit. 
 
  •  
    The following users thanked this post: Menion

deelite

Where can I find the xml files on my phone?
  •  

Tapio

Tapiola MFV4+ theme for OAM Maps:
Discuss - Releases - DL latest - Install latest
  •