Goal: Find something for creating maps on the web
http://openlayers.org/Goal: Use CSS to make the map fullscreen
html, body {
margin: 0;
width: 100%;
height: 100%;
}
div.full {
width: 100%;
height: 100%;
}
Goal: Use your own data
new ol.layer.Vector({
source: new ol.source.Vector({
format: new ol.format.GeoJSON(),
url: 'mydata.geojson'
})
})
What data format do we use here?
mydata.geojson:
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {
"Name": "Andreas Hocevar"
},
"geometry": {
"type": "Point",
"coordinates": [16.3916015625, 48.21735290928554]
}
}]
}
http://geojson.io/
Goal: Map preview of spatial data
Goal: History of changes
Goal: Team collaboration and communication
Goal: Publish web sites easily
Note for Windows users: The portable GitNodeSDK app contains Git, Atom, node an Java.
Task: Create a map with your group members' locations
OpenLayers examples and docs will help - especially for finding a nice background map
The page you'll want to publish is in the dist directory. The master branch should not contain a dist directory. Solution: create a release tag:
git checkout -b release-1.0 master
git add -f dist/*
git commit -m "Tagging the 1.0 release"
git tag 1.0 -m "1.0"
git push --tags
git subtree push --force --prefix dist origin gh-pages
git checkout master
Task: A nice layout for the map from exercise 1
Bootstrap makes CSS easy. It brings simple grid layouts, and many page components like menus, buttons, etc.