2

I want to build a really lightweight web map interface where a user can click anywhere on a map, create a point, type in a comment -- ideally all via Facebook, but I don't want to get ahead of myself -- and have that comment pop up next to the point on mouse-over. Eventually, a large "crowdsourced" smattering of points with comments will be formed ... kind of like this New York Times map.

I have access to everything I need to build something with the ArcGIS API for JavaScript, and some basic knowledge of JavaScript / that API, but am stymied by the need for the following features, in order of importance (1 & 2 are about equal):

  1. A moderator of some sort (me) can go in & remove any inappropriate points/comments.
  2. User X cannot edit any other users' points.
  3. User X who makes a point on the map can go back and edit any of their own points.

It seems the ArcGIS API can help you make a web map that allows a point-editing free-for-all, but nothing like the above features, as far as I know. And I don't know much about the server/database side of web technologies. What kind of technology would even be necessary to:

  • Recognize User X as User X & not User Y?
  • Recognize points a, b, and c as belonging to user X?
  • Letting user X edit those points and no other points?

I imagine there would need to be some kind of account creation / logging-in situation, tied to map editing capability? Where would one even begin crafting something like that?

For functionality, Crowdmap (like this example here) does exactly what I'm looking for in terms of the key requirements 1 & 2, but I want something a lot more simple ... just one click on the map, type in a box to put your comment, and you're done, no clicking through to "report submission" forms with tons of fields and sending it off somewhere to get processed.

For aesthetics & some functionality, I really like the look & simplicity of this cool map, which also fulfills 1 & 2, but I have no idea how user-submitted polygons are being read and presumably appended to a geo-enabled table/database, and in fact that very part seems crucially incomplete, because the things you draw on the map don't seem to actually get saved.

Would love to get pointed in the right direction, as I would be thrilled to know how to do this! Or even what I need to learn more broadly.

  • I am also interested in creating what you described. Maybe we can help each other out. I am curious to know where you gotten so far. Are you using ArcGIS? – user32846 Jun 25 '14 at 18:52
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. – Brad Nesom Jun 25 '14 at 19:46
2

As I understand it, Esri's IdentityManager is designed for managing ArcGIS.com users:

This class provides the framework to implement a solution for managing user credentials for (1) ArcGIS Server resources secured using token-based authentication and (2) Secured ArcGIS.com resources (i.e. web maps).

Your users would need to register for an Esri global account - this is fine for staff members within your organisation, but not so good if you want to allow random users to sign in via Facebook, Google, or your own login system.

You may need to write a "wrapper" which handles the user management aspects of your application.

As a suggestion, you could create an editable feature layer. To incorporate your user management, you'd need functionality which allows edits via the Editor dijit when the user is properly authorised (that's the bit you'd have to write, or perhaps find a plugin which does this).

For example, you could wrap your entire application in a WordPress page, and use something like this user access manager to control who can do what. Or write something in Rails as in this example. (These are both untested - I just mean to find something which already handles common user actions like Register, Sign In, Forgot Password, etc so you don't have to write it yourself.)

In terms of the approval queue, you could write functionality which flagged new edits for you to handle - again there's nothing out-of-the-box for this, to my knowledge.

1

I recently accomplished almost exactly what you describe using ArcGIS (JavaScript API), ArcGIS Server 10.2 (this controls the administration and edit tracking), and PostGRESQL. I originally used this (outdated) Flex API example as a template. In this example, the user logs in and creates some features with related attribute information. These features are then stored in the database along with information related to the specific user.

Do you have an ArcGIS Server license? This is a key component as it hosts your feature services and acts as the bridge between your database and the front-end web mapping interface.

GeoServer is a free alternative to ArcGIS Server, but the learning curve is a bit steeper.

  • That's a great lead! I see the concise name for all this is "ownership-based access control" in ArcGIS Server, which we do have access to. I also see the ArcGIS JavaScript API has a class called IdentityManager, which prompts the user for their Server credentials. But still very unclear about 2 things: 1. How does a user create their credentials in the first place? and 2. It sounds as if Server handles all the editor tracking & associating specific users with features, so where does PostgreSQL come into this? (Based on "Ownership-based access control for feature services" in ArcGIS 10.1 Help). – user14175 Jun 20 '14 at 14:34
1

Well, I'm going to "answer" my own question -- while the below isn't an ideal solution, it is pretty darn close and meets all 3 of the requirements I outlined in the question. Note that the limitations were: No immediately available access to our own map server (as it turned out), I don't have the know-how to write my own user registration system in only a couple of days, and no readily available database back end to store the data or user account info anyway.

First, I set up a Google spreadsheet and created a form in HTML that would submit its values into this spreadsheet. That would be kind of like my "database", that I'd have full moderator access to. Upon submission, Google has built-in functionality to let you go back and edit your own submission, as long as you don't leave the site. You can't mess with anyone else's submissions.

Then, I used the Google Maps JavaScript API to embed a map above the form. When the user clicks the map (within a restricted area delineated by a polygon I threw in there), it automatically writes the coordinates of their click to two fields in the form (and puts a marker there, to let them know that's where they clicked).

When they submit, it's written to the spreadsheet, which I can then pull down and map however I want. So, collecting the crowdsourced points is decoupled from actually mapping them, but that could probably be easily remedied as well.

I wanted something that could potentially take advantage of my own database and ArcGIS Server, so Stephen's answer above did a great job of pointing the way for what I should learn next, but I think this was a great solution given the time and tech constraints. Hope someone finds it helpful.

  • sounds like a really clever solution. Can you post the link when it goes live? – Stephen Lead Jun 30 '14 at 22:33
0

ArcGIS Online for Organization allows to Track edits and restrict edits to feature owners which state:

You can have ArcGIS Online keep track of who created the features in the published feature layer and restrict access accordingly. To track the edits, follow the steps to edit web layer details and check Keep track of who created and last updated features.

In some scenarios, you may want to allow someone to delete or modify the features they created but not delete or modify others' features. This might be the case with volunteered geographic information (VGI) apps in which you want to limit the control each contributor has over the data. To restrict feature modification to just the person who created the feature, check Editors can only update and delete the features they add.

Edits are not tracked if you choose to make the service public.

As the administrator of your organization, you still maintain full editing control over the feature layer. The only downside is that, per the term of service, you will need an AGOL named user login credential for each contributor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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