John Privett Posted December 6, 2012 Share Posted December 6, 2012 Arggghhhh - long reply just lost... Some message about pasting it from Notepad... Quote Link to comment Share on other sites More sharing options...
John Privett Posted December 6, 2012 Share Posted December 6, 2012 OK, take 2... Problem found. Two things, firstly the XML data is malformed, secondly the javascript coding "could be better". So, it seems some clubs don't have any location details. In the XML rather than showing the latitude and longitude elements with no data they miss the elements out altogether. Not a problem neccesarily, but combined with bad code... For a club search the code reads the first name, latitude and longitude elements from the XML and checks to see if the name matches the one you're looking for. If not it reads the next name, latitude and longitude elements and continues until it gets a match. So it now has the n'th name, the n'th latitude and the n'th longitude. In an ideal world these would all 'belong' to the same club. But since some clubs don't have latitude and longitude the n'th latitude and longitude actually belong to a club further down the list than the n'th clubname! OOPS! So it all starts OK, and the first club in the XML data (Limvady) displays in the correct location. The first club with no location is Surrey Freedom Flyers and they "inherit" the location of the next club in the XML data - Border Model Aircraft Club. The further down the XML data you get, the further out of step the data gets. Now XML parsing is not one of my specialities, but surely it should be possible to loop through each club's data and retrieve the name, latitude and longitude for the club, rather than hoping that the n'th occurence of each data element belong to the same club? So either sort out the code, or get the XML data corrected, or both. Then - and only then - will the map work! Now, who I send my invoice to at the BMFA for consultancy? Edited By John Privett on 06/12/2012 02:19:29 Quote Link to comment Share on other sites More sharing options...
John Privett Posted December 6, 2012 Share Posted December 6, 2012 Looks like it's fixed now! Quote Link to comment Share on other sites More sharing options...
Biggles' Elder Brother - Moderator Posted December 6, 2012 Share Posted December 6, 2012 Hope you got paid John! Object lesson that - never let the client see the solution until you see the colour of their money! BEB Quote Link to comment Share on other sites More sharing options...
WolstonFlyer Posted December 6, 2012 Share Posted December 6, 2012 Reading my posts from last night just shows I should stay away from forums after a bad day at work! Anyway it looks like somebody has been very busy making changes and having a quick look the points seem to be correct The Latitude and Longitude have been reformatted to remove the 'e+001' and 'e+000' off the end and the values corrected. Just slightly better storage of the data but the problem with JavaScript is that everything is visible to the client browser including the hidden directory name! I guess it would confuse 90% of web surfers but it is still not very secure. Edited By WolstonFlyer on 06/12/2012 15:07:13 Quote Link to comment Share on other sites More sharing options...
John Privett Posted December 6, 2012 Share Posted December 6, 2012 Yep - the locationless clubs have now been removed from the data - which makes sense! - and the format of long. and lat. made simpler - though to be fair the previous format worked as far as showing something on the map was concerned! The clubs were all in the "right" places, but just with the wrong names! I'm not sure there's a lot of point in the "encryption" of the hidden directory - anybody who knows enough to see that there's something there that's "encrypted" probably knows enough to be able to see what the unencrypted value is. Still, it's probably better than nothing! Quote Link to comment Share on other sites More sharing options...
John Privett Posted December 6, 2012 Share Posted December 6, 2012 Posted by Biggles' Elder Brother - Moderator on 06/12/2012 14:02:27: Hope you got paid John! Object lesson that - never let the client see the solution until you see the colour of their money! LOL, BEB! I'm sure they knew the solution without having to refer to my early-morning ramblings! I reckon I'll get paid exactly what you get for your sterling work on the forum. What's the going rate? Is it still 1 sticky bun per annum? Joking aside, good to see a fix applied quickly on the BMFA website, hope it sets a trend for the future! Quote Link to comment Share on other sites More sharing options...
Former Member Posted January 12, 2013 Share Posted January 12, 2013 [This posting has been removed] Quote Link to comment Share on other sites More sharing options...
Colin Bernard Posted January 12, 2013 Share Posted January 12, 2013 At least your clubs are showing, which is more than mine is! And is it just me or is the old county lookup page not working? I select the county, click list, the page loads - but is exactly the same with no clubs listed. (Could be because I am trying this on an iPad I suppose. Quote Link to comment Share on other sites More sharing options...
Former Member Posted January 12, 2013 Share Posted January 12, 2013 [This posting has been removed] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.