Dierenrijk
In juli 2017 bezocht ik met mijn zoontje Dierenrijk en maakte daar wat foto’s van de dieren. Vandaag deel ik ze met jou!
In juli 2017 bezocht ik met mijn zoontje Dierenrijk en maakte daar wat foto’s van de dieren. Vandaag deel ik ze met jou!
(360×180 degrees panoramas shot with Google Camera on Android, no tripod, displayed with Pannellum)
Almost 14 months after the last big update, Trackserver v3.0 was released today. Since this is quite a big update, with lots of new features and improvements mainly on the presentation side, I thought I’d spend another blog post on it. If you don’t know what Trackserver is, you can read my initial blog post on it, and the update on v2.0 in December 2015. I will present some demos at the end of this post to give you a better idea.
First I will sum up some of the smaller changes. I will get to the big ones later.
L.CircleMarker
objects. These objects were already used for ‘points’ style tracks that were added in v2.2 and now also for the normal markers.Perhaps the biggest change is in the communication between the server side of Trackserver and the JavaScript that is responsible for creating the maps and drawing the tracks. Trackserver has since long distinguished between 3 basic types of tracks:
It was possible to mix these types, but in very limited ways. On top of that, each track, regardless of the type, was downloaded separately, one HTTP request per track. For maps with a lot of tracks, that wasn’t the best design, performance-wise. Both these shortcomings led to a new scheme for getting tracks from Trackserver.
track=a,b,c user=@,x,y,z gpx="URL1 URL2" kml=URL3
and you get them all in one map. The ‘@’ in the user attribute, by the way, is a shortcut for your own username, so user=@
becomes a replacement for track=live
, and the former is preferred as of Trackserver 3.0.user
attribute.Don’t forget: if you want to display GPX or KML files, you are bound to the limitations of CORS.
The [tsmap]
shortcode gained some attributes for more control over the maps and how the tracks are displayed:
user
attibute is now used to specify one or more users’ live maps. You need the ‘trackserver_publish’ capability to publish other people’s tracks. This capability is granted to administrators and editors by default.live
attribute can be used to force enable or disable live-updates. For example, this can be used to turn any track (even an externally hosted GPX file!) into a live track.zoom
attribute can be used for some control on the initial zoom factor when the track is first drawn. This is most useful with maps that have live tracks, because Trackserver would normally zoom in on the latest position in the track, rendering other tracks invisible without zooming out first. For live maps, the argument to the zoom attribute is absolute: what you set is what you get. For maps that have no live tracks, the behaviour is a bit different. By default, Trackserver chooses the zoom factor that makes the best fit for all tracks combined. In this case, the zoom attribute serves as an upper limit, a maximum zoom level, so you can use it to zoom out (but not in) the initial view.Trackserver already had some options to style your tracks: markers
, color
, weight
, opacity
and (since v2.2) points
. However, these style options were per-map, rather than per-track. You would have all markers, or no markers at all. You could have really fat, purple lines for your tracks, but you would have them for all tracks.
Not any longer.
All the styling options now support comma-separated lists of values. Multiple values in such a list will be applied to the specified tracks in order. For example:
[tsmap track=1,2 color=red,#8400ff weight=1 points=n,y]
will draw two tracks on the map: ID 1 in a really thin red line and ID 2 in a collection of purpleish points. I think you get the idea. If less values than tracks are given, the last value is applied to all remaining tracks, so track=1,2,3,4,5 color=red,blue
will give you one red track (ID 1) and four blue ones (IDs 2-5).
There is one thing to keep in mind though, when you specify multiple values. While track order will be preserved within each track type, different track types are evaluated in a specific order, and styling values are applied in that order too. The order is:
Example: [tsmap gpx=/url/for/file.gpx user=jim track=10,99 color=red,blue,green,yellow]
In this case, the GPX track will be yellow, Jim’s live track will be green and tracks 10 and 99 will be red and blue respectively.
Trackserver has a new shortcode: [tslink]
, perhaps not the most intuitive name. This shortcode produces a link, with which the specified tracks can be downloaded as a GPX file. Other formats are on the horizon, please open a feature request issue on Github if you need a specific format. [tslink]
is used almost the same as [tsmap]
, except that it lacks all the styling attributes.
[tslink track=12,87,525 user=patrick]
will give you a link to a dynamically generated GPX file, containing tracks with IDs 12, 87 and 525, as well as Patrick’s latest track. There is also a class
attribute that can be used for styling the resulting <a>
element, and a format
attribute whose only valid value is ‘gpx’ at this time.
If you use Trackserver, I would LOVE to know about it!! If you have problems with it, please open a support request or an issue in Github. If you are happy with it, please leave a review. And if you absolutely love it, please consider a small donation to support development. It will be much appreciated!
A bigger collection of demos can be found on this dedicated demo page, but here are just a couple of them to give you an idea:
[tsmap user=trackserver1]
:
[tsmap track=564,575,656,657,658,625,627,628,629,622,623,624,619,618,620,621,647,630,646,648,653,655 color=black,blue,red,green,#8400ff weight=2 continuous=y opacity=1]
Snow conditions could have been better…
(360×180 degrees panorama shot with Google Camera on Android, no tripod, displayed with Pannellum)
Een paar dagen geleden vond ik op ‘t web Pannellum (“A Lightweight Panorama Viewer for the Web“), en het leek me leuk om daar eens mee te spelen. Daarom heb ik van LEGO® iets geknutseld om mijn telefoon op mijn foto-statief te bevestigen en ben ik met Google Camera aan de slag gegaan. Deze app maakt het erg eenvoudig om photo spheres (360×180 graden panorama’s) te schieten. Het resultaat is een JPEG in de zgn. afstandsgetrouwe cilinderprojectie, oftewel in beter begrijpbaar Engels: de equirectangular projection.
Dit plaatje kan zo met Pannellum worden weergegeven, alleen zijn er limieten op de grootte van de plaatjes, en die zijn per device verschillend. Op mijn PC is dat 4096×2048, en op mijn Android telefoon 2048×1024, voor een volledig 360×180 graden-panorama. Pannellum ondersteunt in een eigen formaat ook multi-resolution panorama’s, maar voor het gemak heb ik maar de grootste gemene deler gepakt en dat is 2048×1024.
Zie hieronder het resultaat. Uiteraard zijn de foto’s niet perfect; zowel de manier van schieten als de software hebben wat beperkingen, maar ik vind het niet onaardig. Klik op het vierkantje in de viewer voor full-screen weergave.
Ik heb overigens ook een poging gedaan om met een DSLR een serie plaatjes te maken, en deze met Hugin aan elkaar te plakken, maar dat brengt weer nieuwe uitdagingen met zich mee. Ten eerste heb je eigenlijk een panoramic head nodig voor je statief, en ‘t is een secuur werkje om alles er goed op te krijgen, zeker als je de volledige 180 graden verticale field of view wilt hebben. Wellicht is dit voer voor een latere post.
I love it when a plan comes together