-
Notifications
You must be signed in to change notification settings - Fork 1
APIs
Info on backend APIs used by this website.
Leaderboards and User stats/badges
https://github.com/loggingroads/osm-stats/blob/master/documentation/API.md
Examples:
- http://osmstats.redcross.org/hashtags/logging-roads
- http://osmstats.redcross.org/hashtags/logging-roads-drc (a campaign tag)
- http://osmstats.redcross.org/hashtags/logging-roads-25 (a task tag)
- http://osmstats.redcross.org/hashtags/logging-roads-mapathon-1 (doesn't exist yet)
Since osmstats has all of OSM, to get top-level summary stats for just our project we need to use the data in the "logging-roads" hashtag, here is some example code:
request.get('http://osmstats.redcross.org/hashtags/logging-roads', function(res){
var data = res.body;
var users = data.users.length;
var edits = data.times.length;
var roads = data.totals.roads;
});
Code at: https://github.com/loggingroads/logging-roads-animation-map
The map can be used in an iframe, see page source at current loggingroads.org
Optional URL Params
Example: http://map.loggingroads.org/#/?hideLogo=true&hideUI=true
- hideUI - hides the map navigation buttons default: false
- disableScroll - disables scroll/mouse wheel from zooming the map, useful if the map is not full screen default: false
- hideLogo - default: false
- disableInteraction - disables all map interaction default: false
- disableScenes - disables scene animation, will just stay at first scene default: false
- showLngLat - overlay lat/lon on top of map, mainly for debugging default: false
- disableButtons - hides the pause button default: false
- showResume - shows a resume button to continue scenes after user is finished interacting with the map default: false
Logging Roads fork of the HOT OSM Tasking Manager
API Documentation: https://github.com/hotosm/osm-tasking-manager2/wiki/API
Notes:
- Terminology - they call the top level task a "project" and each grid square a "task" In most cases we are querying tasking manager "projects" Once the user is inside tasking manager the will lock a grid square to activate a TM task.
- We are in the process of updating the Logging Roads fork of tasking manager so there is a change the API will change slightly... should be resolved soon
Examples:
Logging Roads fork of the OSM to-fix project
List of tasks installed in to-fix
(Note: this may change, need to move it behind a reverse proxy instead of using the non standard port)
URL: http://loggingroads.org:8000/tasks
Example Response:
{
data: [
{
task: "loggingroadstartdates",
attributes: {
owner: "[null]",
title: "",
updated: "1443828633",
description: ""
}
}
]
}Completion stats for a to-fix task
URL: http://loggingroads.org:8000/count/loggingroadstartdates
URL: http://loggingroads.org:8000/track_stats/loggingroadstartdates/from:2015-10-03/to:2016-06-14