Archives par étiquette : traces

Nicer track rendering

One of MyTrails’ design principles has always been performance. I’m very proud of the fact that no other Android mapping application is as fast and smooth as MyTrails. This is partly because it uses OpenGL to render the map and tracks.

A big part of that is that MyTrails has to be able to display tens of tracks with thousands of track points without slowing down, and because of this, I have been hesitant to change the track rendering algorithm.

Things came to a head recently when I implemented the new Time and Distance colorizations. Suddenly (and especially in an emulator running on my low-pixel density computer display), the track looked very crude to me. And it’s always been: zoom out enough and it degenerates into a mess of horizontal and vertical hatches. Even up close, sharp edges in the track look broken. This is because OpenGL’s support for lines is very, very crude.

Also, it’s limited in terms of the thickness of lines it can draw (based on the GPU in each model of phone), and high-density screen in devices that use low-end GPUs (such as the Nexus 4) caused the tracks to be thinner than they should, and lack a border.

No more! In MyTrails 1.4.0, I’ve rewritten the track rendering algorithm, and lines are smoothly blended, can be rendered at any width, and are unbroken at any zoom level. And they’re still very fast (56 frames per second on a Galaxy S3, compared to 57fps for the previous algorithm).

New track rendering

New track rendering

During the beta period for 1.4.0, I will try to keep the hidden option ‘toggle track mode’ operational so you can compare the modes for yourself (there’s an intermediate mode that uses un-smoothed lines). If some phones are too slow for the new rendering mode, I can make it an official option for the release.

You can test the new rendering in MyTrails 2.0.0a6 and shortly in 1.4.0b1.

A few more screenshots to compare the old and new modes.

New colorizations: distance and time

In MyTrails 1.3.24 (currently in beta), I am very excited to add two new colorizations (or 4, depending how you look at them)!

How this came about was: one user wanted an easier way to figure out which way a track that circled back on itself came into and left the intersection. Playing with different possibilities, I realized that being able to visualize time and distance on the track (other than by looking at the speed visualization and performing differential math in our heads), would be useful.

I think my favorite is the distance colorization: it uses alternating black and white bands every 100m (100yd if you’re using imperial units), so you can very easily count the distance between two points on the track. It’s also easier than looking at the scale imagine twisting it along the track.

Distance dashed

Distance dashed

This only works if the track contains a high-enough density of points that MyTrails can alternate colors (which can happen only on a track point, not between points). Generated tracks (from a driving direction service, or by manually adding track points), or highly-simplified tracks (such as you may get from an online track sharing service) may not contain enough track points. Similarly, zooming out causes MyTrails to simplify the track and lose the ability to correctly represent the track.

Similarly, if you want to count how long it took to go from one point to another, the time colorization is very helpful. Each band corresponds to one-minute intervals.

Time dashed

Time dashed

The « rainbow » versions of these colorizations look silly, but they’re useful to try and follow the track through an intersection. Just keep in mind the sequence of colors, and follow along.

Distance rainbow

Distance rainbow

Unfortunately, when you look at these in MyTrails 1.3.24, they will not look as nice and smooth as these screenshots. This is because these were taken with an alpha version of 1.4.0, which I will tease more in another post soon!

Intégration UtagawaVTT

Depuis la version 1.3.15, MyTrails possède une intégration directe avec la communauté de partage de traces UtagawaVTT. Pour l’instant il ne s’agit que d’un accès en lecture (recherche et téléchargement de traces).

Nous travaillons à ajouter la possibilité de partager ses traces depuis MyTrails. En attendant, il reste simple de partager une trace en la récupérant préalablement sur son ordinateur (par exemple grâce à la synchronisation Dropbox) et lancer le partage depuis le site web d’Utagawa.

Recherche et selection des traces

Recherche et selection des traces

Traces importes

Traces importees

Traces affichees sur la carte, avec colorisation en fonction de l'altitude

Traces affichees sur la carte, avec colorisation en fonction de l’altitude