Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Campus Safety Category to Open with Geojson.io Call #109

Open
paulhennings opened this issue Jun 4, 2017 · 2 comments
Open

Add Campus Safety Category to Open with Geojson.io Call #109

paulhennings opened this issue Jun 4, 2017 · 2 comments

Comments

@paulhennings
Copy link
Collaborator

Expected behavior

All table columns plus location (lat/long) will be sent to Geojson.

Actual behavior

The following columns are passed to Geojson:
address category date descript incidntnum location pddistrict resolution time

Steps to reproduce

Run a search that returns results.
Click on the blue button to "Open with Geojson.io".
http://geojson.io site opens with passed JSON displayed on the right side of the screen.

Steps to fix

Add Campus Safety Category to the JSON data passed to Geojson.io

@paulhennings
Copy link
Collaborator Author

Assigning to myself - rethinking the requirement behind this button.

@JoeGaebel
Copy link

JoeGaebel commented Sep 14, 2017

The stumbling block here is that Campus Safety Category is a category we calculate on our app via _csCategoryCheck.

This makes things a little harder, considering the request we're sending to geojson.io basically says "Hey GeoJson.io, can you do a request to SFGov with these params?" via a data:text/x-url link.

What we would need to do instead is to take our data set, which has the Campus Safety Category calculated on it, and send that data to GeoJson.io directly.

Looks like this can be done with a data=data:application/json, and some usage of encodeURIComponent(JSON.stringify(our_great_data))

Looks like however, the buttons generation method refreshDownloadButtonUrls is called before the data is loaded, so some refactoring will need to happen to ensure the data is loaded before the buttons are populated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants