On Github ThomasG77 / foss4g-uk-2016-openlayers-presentation
par @ThomasG77, WebGeoDataVore
Freelance GIS Expert, doing also OpenData and data visualisation, based in France My activities are consultancy, training and on-demand development.
I wrote a book on OpenLayers 3
I mainly develop with JavaScript and Python.
OpenLayers 3 is a JavaScript library for online mapping, release under BSD 2-Clause license.
Its philosophy could be describe as follow:
Maintain a core with extended functionalities with the choice to remove unused library parts depending of your application code.
This is possible using Google Closure Compiler.
There are many other choices to do web mapping, in particular the strong contender Leaflet
In our opinion, as long as your don't meet advanced requirement like projections, canvas rotation or need to consume OGC web services (for SDI for example), you can choose the approach light library "à la Leaflet" with plugins.
If you need a lot of advanced functions without the third party plugins code quality variations, choose OpenLayers 3 as the features coverage is larger than Leaflet with it philosophy of a well maintained small core.
If you are not sure about the requirements you will have, you may prefer OpenLayers to limit the risk to switch later.
No opposition between both OpenLayers and Leaflet libraries: this vision is shared by companies or web mapping agencies that nowadays support both OpenLayers 3 and Leaflet clients.
See also the Zoomify demo
Default Canvas renderer. Drawback: the most interesting renderer, WebGL, does not support all vector types. Funding wanted!
See the OpenLayers-Cesium project
Although interactions can concern zooming, panning, keyboard manipulation and mouse/touch related behaviour, we will focus on querying informations from layers and drawing here.
Client-side vector
Server-side vector with WFS
WMS with GetFeatureInfo
UTF-Grid
It uses forEachFeatureAtPixel (from ol.Map). See associated demo
You pass filter encoding string in the GET or POST URL
Use forEachLayerAtPixel (from ol.Map) combined with getGetFeatureInfoUrl (from ol.source.ImageWMS or ol.source.TileWMS) See associated demo
Look at class ol.source.TileUTFGrid and associated demo
You will need an Overlay (ol.Overlay). It position changes depending of geographical coordinates.
There are various ways to create plugins at the moment.
We maintain a repository covering the ecosystem called awesome-openlayers
Protips:
You may ask why "awesome-...", look at awesome-vector-tiles or awesome-javascript. When you search a programming topic, search in a search engine "awesome-yourprogrammingtopic"
Covering all from this list would not be possible. So, what can you take from the list?
You mainly have choices between:
More or less intrusive frameworks. Choices depend of skills and team/developers personalities.
One of the most impressive is OL3-ext for its variety.