tinuzz
Forum Replies Created
-
Forum: Plugins
In reply to: [Trackserver] Plugin SetupWell, first of all, collecting locations and displaying them on a map are two different things.
1) Does TrackMe display any errors during live tracking?
2) Do any tracks appear in Trackserver’s database (see ‘Manage tracks’) ?Regards,
Martijn.- This reply was modified 6 years ago by tinuzz.
Forum: Plugins
In reply to: [Trackserver] http UploadIn a normal browser, you would be able to embed the credentials in the URL like this:
https://username:password@server/tsupload/
but you’d have to try it to see if it works.
AFAIK, NMEA is a data format, not a protocol. It relates more to the GPX part of a file upload than the HTTP part. How would you get the NMEA data into Trackserver? In any case, NMEA is not a supported format.
Regarding AVL, I’m not even sure what that is. The Wikipedia page for it [1] describes it more as a concept rather than a formal standard, data format or protocol, so I’m totally unsure how that would fit into Trackserver’s domain.
https://en.wikipedia.org/wiki/Automatic_vehicle_location
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] http UploadThe HTTP upload functionality as currently implemented requires HTTP Basic Auth with the WordPress username and password. It only workst with HTTP POST.
Does that work?
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] Managing GPX filesAh, yes. Elevation is part of standard GPX and is stored in the database. It should also be in the export, so I’ll put that on the TODO list.
Other types of data are often part of (proprietary, application specific) GPX extensions, that are hard for Trackserver to handle. I wouldn’t be sure how to handle those.
Can you perhaps share one of those GPX files, so I can have a look at what exactly is in it?
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] Managing GPX filesThere is the [tslink] shortcode, since Trackserver 3.0. To quote the original blog post:
GPX downloads
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.
Does that help?
If you envision something else, please let me know!
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] ‘No tracks to display’Can you try creating a new post or page with the shortcode and see if it works there? I suspect it doesn’t work on your homepage, because it is not an actual page in WordPress terms, and it doesn’t have an author. If the page doesn’t have an author, you run into a permissions problem. Maybe your theme manages the homepage in a non-standard way. I have seen that before.
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] Overlays and GeoJsonJust a quick answer, because I didn’t have mucht time to look into it.
It’s not very complicated, but there are one or two caveats to work around.
First, adding support for ‘geojson’ URLs is easy. Basically, you search the ‘class-trackserver.php’ file for occurrences of ‘kml’, and duplicate that code, replacing all instances of ‘kml’ with ‘geojson’:
Insert at 1109:
'geojson' => false,Insert at 1278:
if ( $atts['geojson'] ) { $urls = explode( ' ', $atts['geojson'] ); $j = 0; foreach ( $urls as $u ) { if ( ! empty( $u ) ) { $u = $this->proxy_url( $u, $post_id ); $tracks[] = array( 'track_id' => 'geojson' . $j, 'track_url' => $u, 'track_type' => 'geojson', 'style' => $this->get_style(), 'points' => $this->get_points(), 'markers' => $this->get_markers(), 'markersize' => $this->get_markersize(), ); $j++; } } }For the rest, Trackserver already knows how to display GeoJSON content, because it can use GeoJSON for internal tracks too.
First caveat: due to its internal use of GeoJSON, Trackserver expects the actual GeoJSON data to be wrapped in some Trackserver-specific construct, so the code must be changed for this use case. The simplest fix would be this:
In trackserver.js, on line 60, replace
return o.track;with
if (o.hasOwnProperty( 'track' )) { return o.track; } else { return o; }With that in place, I was able to display the ‘majorincidents.json’ file using
[tsmap geojson=<url>]It doesn’t seem to work with polygons, though. If your run into CORS restrictions loading JSON from an external domain, you may have to use Trackserver’s proxy feature.
There may be other issues. Please let me know how well this works.
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] ‘No tracks to display’I looked at your page once again. If you look at the source, all the way at the bottom, you’ll see:
var trackserver_mapdata = [{"div_id":"tsmap_1","tracks":[], ..."tracks":[]means, the server is telling the browser there are no tracks to display. So there must be something wrong with your shortcode, a mismatch in usernames or a typo maybe.Can you try:
[tsmap id=<id>]where <id> is the ID of the track in your database?
Best regards,
Martijn.- This reply was modified 6 years, 2 months ago by tinuzz.
Forum: Plugins
In reply to: [Trackserver] ‘No tracks to display’Hi,
In the app, under “TrackMe Server settings”, do you have “Sync my positions” checked?
This setting was introduced a while after Trackserver was born, and the screenshots don’t mention this setting, even though it is disabled by default, IIRC.
If:
– you have at least one track in Trackserver,
– the track actually has some locations,
– you have [tsmap user=@] on your post/page,
– the author of the post/page is the same user that has the track,the track should be visible. If it’s not, I’m not sure what is wrong.
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] Overlays and GeoJsonHi Al,
I think both things are possible with Trackserver’s external file feature, although I haven’t tried drawing polygons, which would only be possible with KML files at this point.
If the data you have available is in GeoJSON, it would indeed seem unncessary to convert it to GPX or KML first, only to have Leaflet-Omnivore convert it back to GeoJSON.
Adding support of GeoJSON files shouldn’t be hard, since I think Leaflet-Omnivore can consume that without problems. It would come down to telling Trackserver about the file type and how to load it.
I’ll have a look to see how much work it is.
Regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] Multi userWell, I it might. You would have to create the same amount of WordPress accounts and instruct everyone how to configure their apps.
And I’m not sure how the webpage with the map would perform if it had to show 100 tracks, but you would have to try.
Trackserver is ‘multi user’ and a WordPress user with sufficient privileges can publish a map with other users’ tracks on it, so that would not be a limitation.
Regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] ‘No tracks to display’So… you are saying that TrackMe says “Position added correctly”, but there are no tracks in your Trackserver database?
If you have the server URL configured correctly and you are actually using the same user account in the app and in WordPress, I’d have to say that’s impossible.
Look at your server logs (MySQL query log perhaps? to see what is actually going on.
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] ‘No tracks to display’Hi Jason,
The “No tracks to display” message seems quite accurate to me if there are no tracks in your database 😉
The URL seems correct, as in: https://ontheroadbike.com/trackme/requests.z (the final URL that TrackMe uses for location uploads) is handled by Trackserver correctly, as far as I can tell.
What does TrackMe say in its log?
Best regards,
Martijn.Forum: Plugins
In reply to: [Trackserver] Multiple Users not workingClosing due to inactivity.
Forum: Plugins
In reply to: [Trackserver] Oruxmaps unable to connectGreat find. Good to hear that it works.
The fact that the value of $request_uri is ‘/.info.php’ seems very strange to me.
Best regards,
Martijn.