dcaliste / maep-qt

A map viewer for Jolla Sailfish OS
29 stars 14 forks source link

Add possibility to set the search address from other programs #38

Open hsjpekka opened 4 years ago

hsjpekka commented 4 years ago

Currently SailfisOS Calendar doesn't open any map if an event location address is tapped. I thought of making a patch that opens Maep and starts searching for the address. I just made one that opens browser to search google maps, but adding Maep would be nice.

If Maep would check some ConfigurationValue, then probably this could be done.

Do you think it is possible? And is ConfigurationValue a good way to transfere info? Or is it possible already?

dcaliste commented 4 years ago

I can add a DBus interface I think that can be called by xdg-open with the geo: scheme. Will try to do it in the next week.

Thanks for the suggestion.

hsjpekka commented 4 years ago

Great. Does that mean that Qt.openUrlExternally("geo://street address") would work also?

hsjpekka commented 4 years ago

If you are interested, I wrote few lines to check the command line arguments, and made a pull request #40. That allows x-scheme-handlers to be used, and Qt.openUrlExternally.

But, command line arguments do not work if the app is running already. Thus, dbus interface would be better.

dcaliste commented 4 years ago

Thanks for the head up, sorry, all Github notifications went to spam folder and I didn't notice anything. My bad :(

As commented on SailfishOS forum, I would like to go the DBus route, but I'm afraid it will break some Harbour rules. Well, I'll add the missing bits and see what we can do for Harbour later.