Posted by jonathan_hunt on June 25, 2008 at 11:53am
| Project: | Trackfield |
| Version: | 5.x-0.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Data input as Lon, Lat, Alt, User (Alt data made up for now). FYI, debugging from trackfield_graph.inc shows:
23:47:15 06/25/08 ident [info] _trackfield_graph: graphdata=Array
(
[dataset] => Array
(
[0] => Array
(
[title] => Grassy Flats Hut to Styx Bridge
)
)
[x_min] => 0
[x_max] => -9999999
[y_min] => 9999999
[y_max] => -9999999
)I'm new to this module, so I might be missing something obvious...
| Attachment | Size |
|---|---|
| Picture 13.png | 63.44 KB |
Comments
#1
I assume the dump included is from line 290-ish in trackfield_graph.inc? Can you also dump the
$graphargsarray at the very start of this function?It doesn't look like your data has not been saved properly. You say you told the input it was 'Lon, Lat, Alt, User' but your screen dump shows KML. Don't think this is an issue but is curious.
Do you have any values in the trackfield_datasets table for this nid?
#2
I originally put the data in as KML but got nowhere so re-entered it as Lon,Lat,Alt, User. Here's some debugging from around _trackfield_graph_get_graphdata()
00:12:52 06/26/08 ident [info] _trackfield_graph_get_graphdata: field=Array
(
[nid] => 996
[vid] => 3091
[field] => field_track
[delta] => 0
[xset] => distance
[yset] => altitude
)
00:12:52 06/26/08 ident [info] _trackfield_graph_get_graphdata: fset=Array
(
[0] => Array
(
[value] => 171.217690019294,-42.8917393524538,1 171.2140126874943,-42.89195817813859,140 171.2123614242352,-42.89197161802603,2 171.2102758570305,-42.89094064458121,140 171.2085828065664,-42.89043319898929,3 171.207738084724,-42.89031428687287,140 171.2069093901887,-42.89046821150244,140 171.2058141166751,-42.89067250113278,140 171.2035417197747,-42.88978109622445,140 171.2028845609908,-42.88989039686976,140 171.2017573180164,-42.89046224610129,140 171.2010223055403,-42.89133391646149,140 171.2006353536914,-42.89193180338386,140 171.2002685710029,-42.89204278768912,140 171.1998449926439,-42.89203053069378,140 171.1966733690995,-42.89164288357883,140 171.1953006665005,-42.89167031628161,140 171.1920201383886,-42.89169301071301,140 171.1897570168214,-42.89169758332513,140 171.1839830724612,-42.89066830080225,140 171.1831665071376,-42.89022913030612,140 171.1829322656027,-42.88971420953783,140 171.18320386775,-42.8885025346218,140 171.183004101818,-42.88794686833115,140 171.1825782063302,-42.88781312337512,140 171.1792705703462,-42.88778741725594,140 171.1786815407075,-42.88764686753763,140 171.1783823942494,-42.88716314882345,140 171.1772945394243,-42.88630319938872,140 171.1768853255842,-42.88622850628013,140 171.1762018632533,-42.88618775837025,140 171.175854899307,-42.88595255189811,140
[valuetype] => lonlatalt
[trackdatasets] => latitude,longitude,distance,altitude
[attributes] => a:1:{s:8:"is_climb";b:0;}
)
)
00:12:52 06/26/08 ident [info] _trackfield_graph_get_graphdata: settype=distance
00:12:52 06/26/08 ident [info] _trackfield_graph_get_graphdata: settype=altitude
00:12:52 06/26/08 ident [info] _trackfield_graph_get_graphdata: dataset=Array
(
[0] => Array
(
[title] => Grassy Flats Hut to Styx Bridge
)
)
00:12:52 06/26/08 ident [info] _trackfield_graph: graphdata=Array
(
[dataset] => Array
(
[0] => Array
(
[title] => Grassy Flats Hut to Styx Bridge
)
)
[x_min] => 0
[x_max] => -9999999
[y_min] => 9999999
[y_max] => -9999999
)
Thanks for the quick response. (going offline for a while now...)
#3
Just noticed table 'trackfield_datasets' is empty. That might explain a fair bit...
#4
Re: #3... yes, that'll do it! ;)
So you must have some issue when saving the data. That issue is none is saved and therefore nothing to graph and hence your error.
Can you please paste in the text here (it's graphically shown above) and will try and enter into the demo system. Or you can register on that and do the same and we'll try and figure out why it's not saved.
#5
http://trackfield.r2b2.net/node/33 entered as Lon Lat works a treat.
http://trackfield.r2b2.net/node/34 pasted from KML fails with DOM errors.
http://trackfield.r2b2.net/node/35 entered as KML, causes DOM errors, then strip tags and specify Lon Lat Alt Usr and works ok.
I tried deleting and re-applying my base track data field but not change (data not stored in db). Will try and look into this on a fresh D5 install and see what happens...
#6
Re: http://trackfield.r2b2.net/node/34
The problem here is that this is a KML snippet only. The field needs a full KML. I mean, something like:
<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.2">
<Document>
<name>KmlFile</name>
<Placemark>
<LineString>
<coordinates>--- snip ---</coordinates>
</LineString>
</Placemark>
</Document>
</kml>
For example, this is what Google Earth will place in your paste buffer if you 'copy' a path in that application.
I Agree the error handling needs more work, sorry.
#7
Ah, ok, thanks. I was working with a KML file with hundreds of Placemarks, so thought the KML snippet would be enough.
Now, I created a new CCK node type and pasted a full KML file into it and it's working, kind-of. See the Placemarks, no track image below. No js errors but no track either.
Also, the jpgraph field is still giving me a jpgraph set scale error: specified Max value must be larger than the specified Min value.
#8
I get a "warning: Wrong parameter count for min() in /home/www/web15/web/drupal5/sites/rivers/modules/trackkfield/trackfield_graph.inc on line 137."
From line 92 in trackfield_graph.inc,
22:54:50 06/26/08 ident [info] _trackfield_graph: graphdata=Array
(
[dataset] => Array
(
[0] => Array
(
[title] => Test Track2
[distance] => Array
(
[0] => 0
[1] => 300.374686908
[2] => 434.819788843
[3] => 639.652839453
[4] => 788.58293625
[5] => 858.615291877
[6] => 928.219238222
[7] => 1020.23675997
[8] => 1230.09759536
[9] => 1284.96303695
[10] => 1396.59252606
[11] => 1510.45102133
[12] => 1583.98188726
[13] => 1616.28995407
[14] => 1650.80223085
[15] => 1912.58753295
[16] => 2024.38758437
[17] => 2291.4833399
[18] => 2475.73580288
[19] => 2959.53961973
[20] => 3042.01121721
[21] => 3102.3263399
[22] => 3238.77762911
[23] => 3302.63230436
[24] => 3340.359516
[25] => 3609.68244609
[26] => 3660.12046563
[27] => 3719.13456662
[28] => 3849.43256233
[29] => 3883.76989193
[30] => 3939.6027642
[31] => 3978.08987139
)
)
)
[x_min] => 0
[x_max] => -9999999
[y_min] => 9999999
[y_max] => -9999999
)
#9
Re: #7
Very interesting. So you can see the track when your data is entered in the demo system here:
http://trackfield.r2b2.net/node/35
But when this same data is entered on your own system things aren't working so well.
The demo system has Gmap module v5.x-1.0-alpha1. That said, I note on the gmap.module page this is dated 17 Jun 2008 and the demo system was certainly put together before then so there may have been some changes since that breaks this.
What version of gmap.module do you have loaded in your system?
Re: #8
Don't worry about that. It's because there's no altitude data in your set so no graph can be shown. I actually noticed and fixed that in release 0.3.
Release 0.3 also re-instates the KML error handling so you'll get a proper(-ish) error.
#10
Sorry, I should have checked the gmap version. I was on a dev version from 2007. Just updated to 5.x-1.0-beta1, but no change to rendering: start and end points in correct order but no track. No js errors reported. I don't have time to dig into it much more just now but will try and get to the bottom of this eventually. Thanks for your help.
#11
I'm closing this issue as the set scale error should be gone. For the gmap issue we have moved on to discuss see #275496: New GMap Brakes TrackField
#12
Automatically closed -- issue fixed for two weeks with no activity.