Skip to content

GIScience/mapswipe-live

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MapSwipe Analytics Live

A tool to display the most recent contributions of the MapSwipe App.

Created at HeiGIT for MapSwipeAnalytics.

screenshot

The purpose of this project is to create a display service for Mapswipe data inspired by OSM Show me the way. Feel free to use this service for your Mapathon or to get a look at examples of Mapswipe.

How it works

The most recent contributions are shown over a Bing imagery background using Leaflet.js. The Live Animation has been created using Leaflet Time Dimension. Recent data is read from a file on the server. See below for data acqusition and processing. The number of features in the example data is the number of features shown before loading new results (Currently N = 500). When all feautures have been shown, the input file has been overwritten with new results and is loaded once again.

How to use the code

You can use this project as a base for your own online display for Maspwipe data or other projects.

Use a geojson as input file for the data aswell as a json file for configuration.

data/live_examples.geojson

The features need to following properties:

Attribute Type Description
result Integer Result coded as Integer
project_id String ID of the mapswipe project
user_name String Mapswipe user name
timestamp Integer Time the result has been uploaded. Unix time
result Integer Result coded as Integer
new_id Integer Unique, continious ID starting from 1. Features will be shown in this order

Furthermore, the file needs to contain a valid geometry. Use WGS 84 (angular unit!).

data/lconfig.json
Attribute Type Description
results Array Contains information about the result: Coded result, color and description
mapOptions Object Contains options for display and interactions of the leaflet map

Elements of 'results'

Attribute Type Description
result String Result coded as number
string String Description of the result
color String color the result will be shown in. Using RGB

Elements of 'mapOptions'

Attribute Type Description
dataPath String Relative path to the data file
fullscreenControl Boolean Enables or disables Leaflet Fullscreen Control
autoplay Boolean Enables or disables automatic play
timeSlider Boolean Enables or disables the Leaflet Time Dimension time slider
speedSlider Boolean Enables or disables the Leaflet Time Dimension speed slider
defaultControl Boolean Enables or disables the Leaflet Time Dimension standart control (back, pause, forwards)

How to gather example data

P. e. using Mapswipe API

Mapswipe Analytics

Use QGis to work with geojson data. The OpenLayers Plugin can help to show the Bing Imagery used in the app. Add the fields specified above.

Bugs, issues and contributions

Feedback is always welcome! For any wishes or notes about bugs please use a issue!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published