Thanks for visiting P2PU. This domain is no longer being updated. Head to www.p2pu.org for the latest information. If you’re looking to create an open online courses, we now support Course-in-a-box

This course will become read-only in the near future. Tell us at community.p2pu.org if that is a problem.

Squashing JavaScript Bugs, Grassroots Mapping, GeoJSON and KML [Feb. 13, 2012, 9:25 p.m.]


 

 
A JavaScript console is an extension that throws a red flag if the JavaScript on your page derails, and shows you where the problem is.
 
<ndoiron> Firefox, you can do Ctrl+Shift+K.  Less than that, http://getfirebug.com/
<seanhorgan> in the world of javascript programming/debugging, firebug is an essential tool to get very familiar with it
<seanhorgan> if you click on the little bug symbol on the bottom right of your firefox window, it should split the screen with the bottom half showing the firebug console
<ndoiron> click the Script tab, then the down arrow, to set JavaScript to Enabled
 
<seanhorgan> Google Chrome has a developer mode (ctrl-shift-j, or ctrl-option-j on Apple) that is similar

Grassroots Mapping : Who, What, When, Where, Why?

<ndoiron> went to open source conference at State Dept... they are quite interested in mapping
<DoRight> Get more resources for us?
<ndoiron> got to meet some of the people behind GrassrootsMapping.org -- they go beyond satellite maps by flying balloons
<introvert> why?
<ndoiron> higher-resolution, more recent, and can be open-sourced
<ndoiron> they took great photos during the BP Oil Spill and now some of those are in Google Maps
 
<introvert> how old are the satellite images
<ndoiron> introvert: if you have Google Earth you can find exactly how old their images are... it can be a few years
 
<rrosso> huh, that's cool. do they use GPS hand-held devices, or rely just on their photographs?
<ndoiron> rrosso: they put thousands of photos online, and people vote on whether they're good quality... I will have to post a link to that
<ndoiron> then they use US gov or Google sat maps to line them up
<ndoiron> and "stitch" them together
<ndoiron> website to vote on photos http://mapmill.org/
<DoRight> Yeah, gorgeous fotos!
 
<DoRight> But if they use google data, does that keep it from being used in opensource?
<ndoiron> I agree, using Google would make it non-free.  But if they're in the US they can use some USGS satellite maps which are free

 
Loading Maps through JSON or KML
<seanhorgan> I'm trying to host a page with a map that draws icons based on locations from a file
<seanhorgan> is it best to store the data in a json format?  
<seanhorgan> i don't have a concrete example for you (yet), but I'd like to iterate through an array of points and plot them on the map
<ndoiron> it does have GeoJSON for input.  Try that format or KML, which people can view in Google Earth
<seanhorgan> can OSM handle KML?
 
Leaflet.js can. More on this later.
 

Get Icon URLs
<introvert> I have one last q- how do I get the filename for icons?
<ndoiron> I don't know if this works in your browser... right click ( two-finger click on map ) and you should have 'Copy Image URL' or 'Copy Image Location'