Falcosc / locus-addon-tasker

Locus Maps API useable as Tasker Plugin
GNU General Public License v3.0
9 stars 2 forks source link

autozoom in Locus map when you reach a distance from a crossing point! #24

Open Yoannjap opened 3 years ago

Yoannjap commented 3 years ago

Hello,

I use both 4.2 gold purchased version of Locus, and updated beta version of Locus Tasker.

I but a big problem caused by a missing feature in Locus app: it doesn't let you use the app easily with cycling. Indeed, you cannot set map autozoom in when you get closer and closer to a crossing, whatever your speed is.

Without this feature implemented, I nearly before each crossing have to stop my bike, to be able to manually zoom in map, in order to check and see exactly how the crossing is drawn on map!

Google Maps and OSM have this feature..

But I saw something interesting on LocusT asker, that I hope can make it possible to set: When you edit a task selecting 'Plugin', 'Locus', 'Request sensors', there are several options that could let you know when you are from, for example, 40 meters from a crossing point. Then I think there is a way with LocusTasker to make a profile letting you command to Locus to zoom in map at, for example, value 24, when you are at 10 seconds or 100 meters from the crossing.

But how to do that with Tasker? I am sure there is a way...

If someone can help :)

Thanks a lot,

Yoannjap Screenshot_20210719-221556

Falcosc commented 3 years ago

You implement a loop and check the distance to the next navigation point. You need Guide Navpoint1 Dist and for better results you may have to check Guide Navpoint1 Action based on speed and distance, you can fine tune your loop. Or to reduce complexity, just execute it every second, there is a time-based trigger which can be configured with a static repeat value, this will look much more simple than a loop with custom wait duration.

Because this is very dependent on your navigation track resolution (amount of navigation hints per track), there will be no predefined solution.

And for that reason, this feature is still missing in locus maps in the first place.

If you spend your time developing and fine tune it for your needs, you will find out why this requirement needs to be manually tuned by each individual user. I would love to create an example because it is so much requested. But if I created one, users would complain about the quality of the result because people how didn't develop this by their own will not understand how to fine tune it and what are the issues with the input data qualities is (navigation track quality) So at the end it is better to avoid creating an example for that.

I hope you understand that we don't focus on helping with basic task development in this issue tracker and focus on talking about more important things like missing variables to solve a specific problem.

Falcosc commented 3 years ago

Here is the setting and reason why this feature does not exist in locus maps: https://docs.locusmap.eu/doku.php?id=manual:user_guide:functions:navigation:settings#frequency_of_commands

It isn't an issue in google maps because in google maps you can't manually draw routes and you cannot import routes.

This frequency_of_commands is one key factor which does affect the quality of junction-based map zoom.

TapioOfTapiola commented 3 years ago

I can already see tons of complexity which can only be a DIY job and you more or less need to be a Tasker geek. Part of the job is measuring distance between 2 points. Here is the calculation function I created for my measuring needs. https://taskernet.com/shares/?user=AS35m8kdDIMDeveQcQfRglam%2Fah1mTW%2FWcg05FZ39c0i1q%2F77iY3E7cIwxCkXqJTaTA%3D&id=Task%3AfGPS_calc

Falcosc commented 3 years ago

I thought you don't need to calculate it, doesn't Guide Navpoint1 Dist update related to your navigation progress?

Yoannjap commented 3 years ago

Thanks a lot Falcosc for your tip, and explanation of why this feature is not implemented. I understand faaar better now.

Ok, I got why you don't want to propose a fixed example.

What I would just need is a basic one, to understand in Tasker how it would work with the plugin.

My idea based on what you said :

Yoannjap commented 3 years ago

Screenshot_20210722-085814 Screenshot_20210722-085928 Screenshot_20210722-085734_1

TapioOfTapiola commented 3 years ago

I cannot reply on anything. Just an important remark because you ask for zooming. You must bookmark: https://github.com/asamm/locus-api/wiki/Action-tasks-(Broadcasts) This is the way to command LM with Tasker. There's two commands which include zooming.

Yoannjap commented 3 years ago

Thanks torturist.

If rule of good is not to publish a public example, could you at list help me by private message. I tried to : disable autozoom on Locus Map setting. Set a profile and task on Tasker as in my screenshot. But it doesn't work yet... I just need a tip to unblock my tests, please.

If not, I give up, and back to GMaps when cycling, to be able not to stop at each crossing. Screenshot_20210722-111229

TapioOfTapiola commented 3 years ago

Here's an otherwise uninteresting task for you. You can see how the zoom actions are used. Replace %Locus with the Locus package name: menion.android.locus

https://taskernet.com/shares/?user=AS35m8kdDIMDeveQcQfRglam%2Fah1mTW%2FWcg05FZ39c0i1q%2F77iY3E7cIwxCkXqJTaTA%3D&id=Task%3AfLocus_Goto

I don't know if you can directly control autozoom. But eg you can call profiles via Locus actions.

Don't be sad if you can't achieve it. Some stuff requires good knowledge of Tasker, JavaScript and Locus. And the complex things typically are very individual, modular and subject of permanent fiddling and improving...

Yoannjap commented 3 years ago

Wooow thanks a lot for that brilliant thing.

It works to autozoom in.

However, it autozooms whatever the distance is from ceossig point. And so, it doesn't zoom out to the previous zoom level that was set before, for example 30 meters after having crossed it.

And each second is displayed the notification alert 'report to developer. Screenshot_20210722-143846 Screenshot_20210722-143927

TapioOfTapiola commented 3 years ago

Well, your debugging skills are required. What overlay is this?

Yoannjap commented 3 years ago

Gosh, I don't have those skills. But I hope your idea will help other people like me that want this feature, like it in those 2 forums :

The overlay is Lockito (https://play.google.com/store/apps/details?id=fr.dvilleneuve.lockito), a mock location app that simulates a direction itinerary.

ThomasKeim commented 2 years ago

There is a new solution for Autozoom https://forum.locusmap.eu/index.php?topic=8047.0