Presentation |
http://bit.ly/2uF2IhL |
Workshop |
http://bit.ly/2viXRGF |
Web Cartographer & Geo ICT developer
Maptime Amsterdam & Utrecht
Internship Geo Web Visualization
Msc Geo Information Science & Remote Sensing
Tools we use:
QGIS
PostgreSQL
GeoServer, MapServer
JavaScript: Leaflet, OpenLayers, MapboxGL, D3
Ubuntu, Linux command line tools
Time for making maps!
Maptime is hands on!
Next: Wednesday 27 sept QGIS workshop!
Next: TBA October
At the end of this workshop, you will have your own web page with an interactive map! Including custom data and different background maps, of the area you want to show! Your web page will be hosted on Github, so you can immediately share your progress with all your family and friends!
For beginners means: if you have NO knowledge of JavaScript, HTML, CSS, Leaflet.js and D3.js, this workshop will help you get started!
Introduction | 15 min |
Leaflet.js | 15 min |
Workshop Leaflet.js | 60 min |
Break! | |
D3.js | 15 min |
Workshop D3.js | 60 min |
Show & tell |
Analogue paper maps
Digital maps | VS | Web Maps |
---|---|---|
Data | Tiles, styles and servers | |
On the computer | View in a browser | |
Calculate, analyze | scroll, pan, zoom |
Digital maps
GIS software
GIS on the Web is not user friendly..
1996 Mapquest first with a web service!
in 2004 Endoxon found a way for quick online mapping! map.search.ch
2005 Google Maps took over!
The solution?
All tiles size 256x256 pixels
Placed in a grid, sharing boundaries
Seamless map
All these little tiles load way faster than one big map!
We call this slippy maps
Each zoom level has its own set of tiles!
Zoom level 0: 1 tile for the whole world.
Increases exponentially...
Zoom level 1: 4 tiles
Zoom level 2: 16 tiles
etc.
Tiles are styled and rendered in advance
Tiles are just images on the web
http://tile.openstreetmap.org/5/16/10.png
/z/x/y
Base Layer
Raster
Data Layer / Feature Layer
Vector
Data, styled, tiles, server:
Base Layer
Additional Data:
Vector Layers
Interface and Interaction
Zoom, panning, clicking etc.
Puts it all together,
Tiles, content, interaction
Start with Making a web page
Or use Code Academy
Tiles for Base layer
Data layers, polygons, lines & points
Functionality: zoom, pan, popups, markers, routes, etc.
Interactivity
etc.
Including a JavaScript library in your code is like copying and pasting someone else's code into yours. You have access to everything in that library.
In our case, it's a bunch of cool tools to make web maps and give them familiar functionality.
An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps
simplicity, performance and usability
Developed by: Vladimir Agafonkin.
Weighing about 38 KB of JS.
Has all the mapping features most developers ever need.
Can be extended with Plugins
Well documented
Provide data for you.
Provide the basemap.
Its not GIS
Include in HTML head
HTML body
CSS
#mapid { height: 180px; }
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
Add a Base Map
Adding markers, circles, polygons
Add custom data
Everything is on Github
Used for code.
Version control.
Sharing.
Documentation.
NOT Notepad+ ...
See Blackboard!
Made for Boston, USA
Assignment: Change every coordinate of the examples to the Netherlands!!
Not to big datasets
Export to GeoJSON: WGS84
Remove any not used attributes first!
Points, Polygons or Lines?
Attribute names are crucial! simple, short, no spaces or symbols
Running a local server
C:\Python27\ArcGIS10.5\python -m SimpleHTTPServer
Use the INTERNET!
Use the Leaflet documentation!
StackOverflow is awesome!
Ask me
There is more to find on the Internet
Do not keep yourself to the assignments!!
Presentation |
http://bit.ly/2uF2IhL |
Workshop |
http://bit.ly/2viXRGF |
Presentation |
http://bit.ly/2uF2IhL |
Workshop |
http://bit.ly/2viXRGF |
Data Driven Documents
A JavaScript library for manipulating documents based on data
D3 helps you bring data to life using HTML, SVG, and CSS.
Developed by Mike Bostock
Allows you to bind data to the DOM and apply data-driven transformations to the document
HTML, SVG, and CSS
Fast
supports large datasets
Dynamic, interaction, animation
Text-based, mathematical representation of an image.
Vector Graphics
Can be searched, indexed, scripted, and compressed!
a slippy map creator
Not based on tiles!!
Charts (pie, line), Tables, Maps, Networks, animation & interactivity
Selecting elements by :
[.Class #Id Type]
d3.selectAll("p").style("color", "white");
d3.select("body").style("background-color", "black");
Styles: transparency, color, size, borders
d3.selectAll("p").style("color", "white");
Attributes: classes, id, interactive behavior
d3.selectAll(".small").atr("class", "big");
Properties: state, true/false
Transitions: animation, delay, transformation
d3.selectAll("p").style("color", function() {
return "hsl(" + Math.random() * 360 + ",100%,50%)";
});
d3.selectAll("circle").transition()
.duration(750)
.delay(function(d, i) { return i * 10; })
.attr("r", function(d) { return Math.sqrt(d * scale); });
Making a simple map, countries as polygons
Adding Point data, Style data driven
Adding legends and graphs based on the same data
Everything is on Github
Use the INTERNET!
StackOverflow is awesome!
Use the D3.js documentation!
Use bl.ocks.org
Ask me
There is more to find on the Internet
playing is learning
Do not keep yourself to the assignments!!
Presentation |
http://bit.ly/2uF2IhL |
Workshop |
http://bit.ly/2viXRGF |
Feedback please?
Stay in touch or questions:
niene@webmapper.net
In random order:
All contributors from Mapschool.io
Maptime Boston
Lyzi Diamond
Wikipedia
Leaflet.js
D3.js
Webmapper
Waag Society
Maptime Amsterdam
Maptime Utrecht
Maptime IO
Code Academy
tutorials of Scott Murray
Noah Veltman
Mike Bostock
Giphy
BFRO
Alan McConchie
Beth Schechter