Jim's
Tutorials

Spring 2015
course
navigation

Mar 05

I went through and caught a handful of minor bugs. The trail system still is not being drawn. It was recognizing the variables earlier but the last version I uploaded threw that off somehow and I haven't had much of a chance to dig back into it. Mainly the thing I need to work on now is how the data is getting read in/parsed. When it was recognizing the global variables I noticed it broke down when I tried to access "line" from the parsed data. E.G. the first line should look like:
{"X": -72.234, "Y": 42.89, "id": 982384, "name": "Town Trail", ...}
and I should be able to access 'X' by calling line.'x', line is defined as trails[i] when looping through trails (see http://csmarlboro.org/agoren/web_gis/marlboro_map/parse_trailsData.js ).
Here's the page I'm referring to: http://csmarlboro.org/agoren/web_gis/marlboro_map/draw_map_trail1.html

Jim says

I will before Monday take a closer look at this javascript code and debug it, to see if we can get back to the working state it was.
Here are the working ones that this comes from :
The new version should parse the .csv file and then display all of the trails that have a trailname.

Jim on Sunday night

A working version is attached, with your two .js files collapsed into one and somewhat cleaned up and debugged. See the comments in parse_and_draw.js for the details.
Oh, and the files I put here have unix-ish carriage return and line feeds, so they're a little different than the DOS convention ones you've posted before. Shouldn't matter - just letting you know that the .csv for example isn't exactly the same as what you uploaded. (See http://en.wikipedia.org/wiki/Newline for the details on the difference, if you're interested.)
http://cs.marlboro.edu/ courses/ spring2015/jims_tutorials/ agoren/ Mar_05
last modified Monday March 9 2015 3:01 am EDT

attachments [paper clip]

     name last modified size
[TXT]draw_map.css Mar 9 2015 1:15 am 510B [TXT]map.html Mar 9 2015 1:16 am 906B    marlboro_trails1.csv Mar 9 2015 1:16 am 55.3kB [COD]papaparse.min.js Mar 9 2015 1:16 am 13.3kB [COD]parse_and_draw.js Mar 9 2015 3:46 am 8.91kB [COD]parse_and_draw_bare.js Mar 9 2015 2:58 am 1.88kB