locus-actions:// and www bookmarks tiny enhancements
My goal is still to "tap a single button" and have custom data appear in Locus instantly. No "imports", no web browsers, no navigating through menus or directory structures, no rubbish user interface, just a single tap.
Locus has everything for that builtin already, it's all just a question of tying together a few lose ends here and there. Quick WWW Bookmarks could work together with locus-actions to accomplish that goal. Imagine the following action:
<download><source>http:x.x/getmydata.php?type=kmz&lat={lat}&lon={lng}</source><dest>/mapItems/{bookmarkname}.kmz</dest><after>enableMapItem</after></download>
To make this work, three tiny enhancements are required in Locus:
(1) locus-actions <after> command needs to implement an enableAsMapItem switch.
(2) Quick www bookmarks should allow specifying a complete locus action XML string instead of a simple URI. No user interface change is required. If the definition is an URI, you launch it just like now. But if the definition starts with "<", you treat is as xml and simply hand it over to your locus-action-engine.
(3) Quick www bookmarks needs a {bookmarkName} parameter.
Hello Stefan,
I think you may already accomplish this task, but little bit different.
1. define bookmark to own server over locus-actions, like this:
locus-actions://http/myserver.com/getmydata.php?type=kmz&lat={lat}&lon={lng}
2. tap on this link should forward action to Locus itself (in next version this should already work) and Locus should then call link http://myserver.com/getmydata.php?type=kmz&lat=Y&lon=X and download XML from there
3. on your server, handle received request and generate XML with all actions you require. <after>displayData</after> should work.
If something won't work in method above, let me know.
Hello Stefan,
I think you may already accomplish this task, but little bit different.
1. define bookmark to own server over locus-actions, like this:
locus-actions://http/myserver.com/getmydata.php?type=kmz&lat={lat}&lon={lng}
2. tap on this link should forward action to Locus itself (in next version this should already work) and Locus should then call link http://myserver.com/getmydata.php?type=kmz&lat=Y&lon=X and download XML from there
3. on your server, handle received request and generate XML with all actions you require. <after>displayData</after> should work.
If something won't work in method above, let me know.
Replies have been locked on this page!