I'm wondering what would considerations I should make for using CartoDB as a tool for collecting geo-located citizen comments.

Currently we're using a javascript / bootstrap application that uses a google map to get a users X,Y location. It requires the manual entry of an address or the movement of the pin on the map to get that X,Y. There are then other form inputs where the user can enter their name, and other comments about the location, their contact info, etc.

The form inputs, as well as the XY, are then fed to a google spreadsheet where they are manually extracted to a CartoDB map on our main site.

Can CartoDB be used to replace this google doc method, and what do I need to think about in terms of using the SQL API?

Is it a good practice to expose the necessary information to use that SQL API?

How could I use the 'get my location' feature on most browsers to automatically get a users location and feed it into the geometry of row in a CartoDB table?

closed as too broad by PolyGeo Apr 28 at 6:00

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


This is two questions:

  1. How do you use the Geolocation API to find a user's location?
  2. What's the best way to get information into CartoDB from the web?

I don't have enough experience to say how (1) would work in Google Maps, but if you are open to using Leaflet (an open source mapping library), you can pretty easily attempt to find a user's location using locate().

For (2), I actually think Google Spreadsheets -> CartoDB isn't a bad approach. I would suggest writing a script to grab the latest entries from your Google Spreadsheet and insert it them into CartoDB using their SQL API. This could run every five minutes if you wanted.

Otherwise, I wouldn't recommend inserting into a CartoDB table client side. If you do you'll expose your API key, and anyone could do nasty things to your database.


Have a look at http://fixmystreet.org/ Might be a good fit for you.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.