diff --git a/cartoDB_functions/insert_function.sql b/cartoDB_functions/insert_function.sql index d77c2ed..7b75934 100644 --- a/cartoDB_functions/insert_function.sql +++ b/cartoDB_functions/insert_function.sql @@ -3,26 +3,26 @@ DROP FUNCTION IF EXISTS insert_bikeways_data(text,text,text,text); CREATE OR REPLACE FUNCTION insert_bikeways_data ( _geojson TEXT, - _notes TEXT, + _description TEXT, _name TEXT, _zip TEXT) --Has to return something in order to be used in a "SELECT" statement RETURNS integer AS $$ -DECLARE +DECLARE _the_geom GEOMETRY; BEGIN - --Convert the GeoJSON to a geometry type for insertion. - _the_geom := ST_SetSRID(ST_GeomFromGeoJSON(_geojson),4326); + --Convert the GeoJSON to a geometry type for insertion. + _the_geom := ST_SetSRID(ST_GeomFromGeoJSON(_geojson),4326); - EXECUTE ' INSERT INTO bikeways (the_geom, notes, name, zipcode) + EXECUTE ' INSERT INTO bikeways (the_geom, description, name, zipcode) VALUES ($1, $2, $3, $4) - ' USING _the_geom, _notes, _name, _zip; - + ' USING _the_geom, _description, _name, _zip; + RETURN 1; END; $$ LANGUAGE plpgsql SECURITY DEFINER ; --Grant access to the public user -GRANT EXECUTE ON FUNCTION insert_bikeways_data(text,text,text,text) TO publicuser; \ No newline at end of file +GRANT EXECUTE ON FUNCTION insert_bikeways_data(text,text,text,text) TO publicuser; diff --git a/index.html b/index.html index 045d050..70c55a2 100644 --- a/index.html +++ b/index.html @@ -11,13 +11,13 @@ - - + + - - + + @@ -25,23 +25,23 @@ - + - + - +
- +
- -
+ +
    @@ -54,7 +54,7 @@
-
+
    @@ -92,44 +92,43 @@ diff --git a/js/userconfig.js b/js/userconfig.js index 453a487..04d9554 100644 --- a/js/userconfig.js +++ b/js/userconfig.js @@ -4,16 +4,16 @@ var config = { //Set Map Bounds & point map is centered around - mapFocus : [42.381899, -71.122499], - south : 42.24 , - west : -71.27, - north : 42.453, - east : -70.95, + mapFocus : [41.68932225997044, -88.11035156249999], + south : 36.73888412439431 , + west : -91.7138671875, + north : 42.71473218539458, + east : -87.1875, //Mapbox access token & key for basemap - mapboxAccessToken : - 'pk.eyJ1IjoicmVtb3RlZ2VudHJpZnkiLCJhIjoiY2lnanJzMjJpMDA1dnYxbHo5MTZtdGZsYSJ9.gLE8d40zmDAtMSSZyd2h1Q', + mapboxAccessToken : + 'pk.eyJ1IjoiZWFzaGVybWEiLCJhIjoiY2oxcW51Nzk2MDBkbTJxcGUxdm85bW5xayJ9.7mL0wQ7cjifWwt5DrXMuJA', //Change to your username, insert function on cartodb, and cartodb tablename (see also /cartoDB_functions) - cartoDBusername : 'raphaeld', + cartoDBusername : 'easherma', cartoDBinsertfunction : 'insert_bikeways_data', - walkthroughWelcome: "

    This webmap allows you to view data collected by the Boston Cyclists Union on biking in Boston.

    It also allows you to submit input on where biking infrastructure can be improved by drawing on the map! The map is restricted to the inner core of Metro Boston, where we concentrate our advocacy.

    " -}; \ No newline at end of file + walkthroughWelcome: "

    This webmap allows you to submit input on where critical rural freight coordiors can be improved by drawing on the map. It also allows you to view relevant data we have collected.

    " +};