I’m trying to modify the maps app to display additional vcard data in the tooltip-contact-content area and the hover-over tooltip of each contact. Can anyone point me in the right direction to start to do this? It seems like it should be a pretty trivial change but I can’t seem to figure out where in the app code this change should be made.
I’ve been able to change the geolocator code to parse and use Pelias JSON responses instead of nominatim and need to do this as a crucial next step to get this proof-of-concept out the door.
Honestly it is rather hard to tell you what to do if one has no clue about your experience and success so far. What did you do so far? What is missing?
What I’ve done so far:
I’ve modified the PHP code of the Maps app to pull and parse a JSON response from my own locally hosted Pelias geocoding server instead of nominatim.
What I am trying to do:
Modify the Maps app to include more detail on the tooltip like this:
I am looking for where to start in the code to be able to accomplish this.
OK I found the area of the code that appears to govern what is placed in this tooltip under “ContactLayer.vue” in the src directory, but manipulating this code appears to do nothing… I’m thinking this is a template file that is used to generate pages and code but I have no idea how Vue.js works in the context of nextcloud.
Admittedly I have never used Vue.js though it does look interesting and I can make my way around pretty well I think.
I suspect, you did use a git-based installation of the maps app, right?
According to the current
master branch, there are multiple scripts defined. So, you can e.g. use
npm run watch to keep looking at the sources and update the built files automatically. A reload of the browser should be sufficient to use the updated sources. (Note: you should disable the caching by keeping the web developer console open just in case.)
Of course you need the node packages installed before running the build script.
I didn’t use git-based, I simply installed from apps and started picking through code. I’m very new to nextcloud.
I’ll try the approach you’re suggesting and I suspect that it will work. Thank you for the feedback I appreciate your help.