NGEO – OpenLayers meets Angular
Roman Zoller
2/21www.camptocamp.com /
OpenLayers – Übersicht
■ Open Source JavaScript-Bibliothek für die Anzeige von Karten
(Rasterdaten in Kacheln)
■ Features
○ Vektorlayer in diversen Formaten
○ Mobile Browser
○ Rendering: Canvas und WebGL
○ Plugins
3/21www.camptocamp.com /
OpenLayers – Beispiel
<div id="map"></div>
<script>
new ol.Map({
layers: [
new ol.layer.Tile({source: new ol.source.OSM()})
],
view: new ol.View({
center: [0, 0],
zoom: 2
}),
target: 'map'
});
</script>
Quelle: http://openlayers.org/en/latest/doc/tutorials/concepts.html
4/21www.camptocamp.com /
OpenLayers – Beispiel
5/21www.camptocamp.com /
AngularJS – Übersicht
■ Beliebtes Framework für Single-Page-Webanwendungen
■ Model-View-ViewModel (MVVM, Variante von MVC)
■ Version 1: https://angularjs.org/
■ Aktuelle Version: https://angular.io/
6/21www.camptocamp.com /
AngularJS – Beispiel
■ Zwei-Wege-Datenbindung
<html ng-app>
<input type="text" ng-model="search">
<p>Du suchst gerade nach: {{ search }}</p>
Quelle: https://angularjs.de/artikel/angularjs-tutorial-deutsch
Siehe auch: https://stackoverflow.com/questions/14994391/thinking-in-angularjs-if-i-have-a-jquery-background
7/21www.camptocamp.com /
AngularJS – Beispiel
8/21www.camptocamp.com /
Ngeo
■ AngularJS-Integration der wichtigsten OpenLayers-Features
■ Zusatzfunktionen
○ Layer tree
○ Messen, Zeichnen, Höhenprofil
○ Suche mit Autovervollständigung
■ Keine eigenständige Anwendung, sondern eine Bibliothek mit
wiederverwendbaren Bausteinen
■ Kein vorgegebenes Layout (CSS)
9/21www.camptocamp.com /
Ngeo – Beispiel
// HTML
<div ngeo-map="$ctrl.map"></div>
// Controller
this.map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
view: new ol.View({
center: [0, 0],
zoom: 2
})
});
Quelle: http://camptocamp.github.io/ngeo/master/examples/simple.html
10/21www.camptocamp.com /
Ngeo – Beispiel
11/21www.camptocamp.com /
Ngeo – Layer tree
<div ngeo-layertree="$ctrl.tree"
ngeo-layertree-map="$ctrl.map"
ngeo-layertree-nodelayer="$ctrl.getLayer(node)"></div>
■ ngeo-layertree: Der Layer tree, jeder Knoten hat ein Attribut „name“
(String), optional ein Attribut „children“ (Array von Knoten).
■ ngeo-layertree-map: Referenz auf das OpenLayers map Objekt.
■ ngeo-layertree-nodelayer: Funktion, welche das Layer für einen
bestimmten Knoten zurückgibt.
Dokumentation: https://camptocamp.github.io/ngeo/master/apidoc/ngeo.layertreeDirective.html
Demo: http://camptocamp.github.io/ngeo/master/examples/layertree.html
12/21www.camptocamp.com /
Ngeo – Layer tree
13/21www.camptocamp.com /
Ngeo – Layer tree
14/21www.camptocamp.com /
Ngeo – Interaction
Quelle: https://camptocamp.github.io/ngeo/master/examples/interactionbtngroup.html
15/21www.camptocamp.com /
Ngeo – Search
Quelle: https://camptocamp.github.io/ngeo/master/examples/search.html
16/21www.camptocamp.com /
Ngeo – Weitere Informationen
■ Code
○ https://github.com/camptocamp/ngeo
■ Dokumentation
○ https://camptocamp.github.io/ngeo/master/apidoc
■ Beispiele
○ https://camptocamp.github.io/ngeo/master/examples
17/21www.camptocamp.com /
Anwendungsbeispiele
■ Geoportal Luxembourg
○ http://map.geoportail.lu/
■ GeoMapFish
○ http://geomapfish.org/ => Links zu diversen Anwendungen
18/21www.camptocamp.com /
Geoportal Luxembourg
19/21www.camptocamp.com /
GeoMapFish
http://geomapfish.org/
20/21www.camptocamp.com /
Ausblick
■ ES6 (aka ES2015)
○ Kompilierung mit Google Closure Compiler
○ ES6 Features werden schrittweise eingeführt
○ ES6 Module in Arbeit
- Einbindung von Teilen von Ngeo ohne Verwendung von Closure Compiler
■ Angular 2 / Typescript
○ Evtl. später
NGEO – OpenLayers meets Angular

Weitere ähnliche Inhalte

PDF
GeoMapFish, the Open Source WebGIS
PDF
OpenLayers 3 & Google Closure Compiler
PDF
#Nanocristalización #84minerales #controllinnerseal para pavimentos de #Horm...
PPTX
Private Actors
PPTX
Workshop Science and Media EEMCS 27th March 2017
PPTX
Architecting Reality IAS 2015
PPTX
Introduction to MongoDB with Sitecore
PPTX
Dimex German uPVC Windows & Doors Systems
GeoMapFish, the Open Source WebGIS
OpenLayers 3 & Google Closure Compiler
#Nanocristalización #84minerales #controllinnerseal para pavimentos de #Horm...
Private Actors
Workshop Science and Media EEMCS 27th March 2017
Architecting Reality IAS 2015
Introduction to MongoDB with Sitecore
Dimex German uPVC Windows & Doors Systems

Andere mochten auch (7)

PPTX
Dal gusto
PDF
Media sosial dan relationship
PPS
Cartes OACI
PPT
Effective safety committee operations
PPTX
.NET Core, ASP.NET Core e Linux per il Mobile
PDF
6 Panel Comic Book Page
Dal gusto
Media sosial dan relationship
Cartes OACI
Effective safety committee operations
.NET Core, ASP.NET Core e Linux per il Mobile
6 Panel Comic Book Page
Anzeige

Mehr von Camptocamp (20)

PDF
ERP et customisation : comment éviter l’usine à gaz ?
PDF
10 points-clés incontournables pour réussir votre projet ERP
PDF
Topsoft 2017: Praxisbericht: Welche Fehler bei der Implementierung eines ERP-...
PDF
Geo mapfish 2_foss4g-eu_2017
PDF
Ge orchestra open_source_inspire_sdi-project_status_foss4g-eu_2017
PDF
Data processing qgis3_foss4g-eu_2017
PDF
AGIT 2017: GeoMapFish_2.2, the open source WebGIS
PDF
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
PDF
AGIT 2017: geOrchestra 16.12, the open source INSPIRE SDI
PDF
[Geocom2017] geOrchestra and ngeo
PDF
[Geocom2017] Georchestra & monitoring
PDF
MapFish Print 3
PDF
georchestra SDI: Project Status Report
PDF
GeoMapFish, the Open Source WebGIS
PDF
Présentation GeoMapFish
PDF
OpenLayers 3
PDF
Une IDS scalable et résiliente avec geOrchestra & Docker
PDF
geOrchestra, a free, modular and secure SDI
PDF
FOSS4G Europe 2015: OL3-Cesium (3D for OpenLayers)
PDF
Odoo verticalization for NGO
ERP et customisation : comment éviter l’usine à gaz ?
10 points-clés incontournables pour réussir votre projet ERP
Topsoft 2017: Praxisbericht: Welche Fehler bei der Implementierung eines ERP-...
Geo mapfish 2_foss4g-eu_2017
Ge orchestra open_source_inspire_sdi-project_status_foss4g-eu_2017
Data processing qgis3_foss4g-eu_2017
AGIT 2017: GeoMapFish_2.2, the open source WebGIS
AGIT 2017: Cesium 1.35, WebGL Virtual Globe and Map Engine
AGIT 2017: geOrchestra 16.12, the open source INSPIRE SDI
[Geocom2017] geOrchestra and ngeo
[Geocom2017] Georchestra & monitoring
MapFish Print 3
georchestra SDI: Project Status Report
GeoMapFish, the Open Source WebGIS
Présentation GeoMapFish
OpenLayers 3
Une IDS scalable et résiliente avec geOrchestra & Docker
geOrchestra, a free, modular and secure SDI
FOSS4G Europe 2015: OL3-Cesium (3D for OpenLayers)
Odoo verticalization for NGO
Anzeige

NGEO – OpenLayers meets Angular

  • 1. NGEO – OpenLayers meets Angular Roman Zoller
  • 2. 2/21www.camptocamp.com / OpenLayers – Übersicht ■ Open Source JavaScript-Bibliothek für die Anzeige von Karten (Rasterdaten in Kacheln) ■ Features ○ Vektorlayer in diversen Formaten ○ Mobile Browser ○ Rendering: Canvas und WebGL ○ Plugins
  • 3. 3/21www.camptocamp.com / OpenLayers – Beispiel <div id="map"></div> <script> new ol.Map({ layers: [ new ol.layer.Tile({source: new ol.source.OSM()}) ], view: new ol.View({ center: [0, 0], zoom: 2 }), target: 'map' }); </script> Quelle: http://openlayers.org/en/latest/doc/tutorials/concepts.html
  • 5. 5/21www.camptocamp.com / AngularJS – Übersicht ■ Beliebtes Framework für Single-Page-Webanwendungen ■ Model-View-ViewModel (MVVM, Variante von MVC) ■ Version 1: https://angularjs.org/ ■ Aktuelle Version: https://angular.io/
  • 6. 6/21www.camptocamp.com / AngularJS – Beispiel ■ Zwei-Wege-Datenbindung <html ng-app> <input type="text" ng-model="search"> <p>Du suchst gerade nach: {{ search }}</p> Quelle: https://angularjs.de/artikel/angularjs-tutorial-deutsch Siehe auch: https://stackoverflow.com/questions/14994391/thinking-in-angularjs-if-i-have-a-jquery-background
  • 8. 8/21www.camptocamp.com / Ngeo ■ AngularJS-Integration der wichtigsten OpenLayers-Features ■ Zusatzfunktionen ○ Layer tree ○ Messen, Zeichnen, Höhenprofil ○ Suche mit Autovervollständigung ■ Keine eigenständige Anwendung, sondern eine Bibliothek mit wiederverwendbaren Bausteinen ■ Kein vorgegebenes Layout (CSS)
  • 9. 9/21www.camptocamp.com / Ngeo – Beispiel // HTML <div ngeo-map="$ctrl.map"></div> // Controller this.map = new ol.Map({ layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }) ], view: new ol.View({ center: [0, 0], zoom: 2 }) }); Quelle: http://camptocamp.github.io/ngeo/master/examples/simple.html
  • 11. 11/21www.camptocamp.com / Ngeo – Layer tree <div ngeo-layertree="$ctrl.tree" ngeo-layertree-map="$ctrl.map" ngeo-layertree-nodelayer="$ctrl.getLayer(node)"></div> ■ ngeo-layertree: Der Layer tree, jeder Knoten hat ein Attribut „name“ (String), optional ein Attribut „children“ (Array von Knoten). ■ ngeo-layertree-map: Referenz auf das OpenLayers map Objekt. ■ ngeo-layertree-nodelayer: Funktion, welche das Layer für einen bestimmten Knoten zurückgibt. Dokumentation: https://camptocamp.github.io/ngeo/master/apidoc/ngeo.layertreeDirective.html Demo: http://camptocamp.github.io/ngeo/master/examples/layertree.html
  • 14. 14/21www.camptocamp.com / Ngeo – Interaction Quelle: https://camptocamp.github.io/ngeo/master/examples/interactionbtngroup.html
  • 15. 15/21www.camptocamp.com / Ngeo – Search Quelle: https://camptocamp.github.io/ngeo/master/examples/search.html
  • 16. 16/21www.camptocamp.com / Ngeo – Weitere Informationen ■ Code ○ https://github.com/camptocamp/ngeo ■ Dokumentation ○ https://camptocamp.github.io/ngeo/master/apidoc ■ Beispiele ○ https://camptocamp.github.io/ngeo/master/examples
  • 17. 17/21www.camptocamp.com / Anwendungsbeispiele ■ Geoportal Luxembourg ○ http://map.geoportail.lu/ ■ GeoMapFish ○ http://geomapfish.org/ => Links zu diversen Anwendungen
  • 20. 20/21www.camptocamp.com / Ausblick ■ ES6 (aka ES2015) ○ Kompilierung mit Google Closure Compiler ○ ES6 Features werden schrittweise eingeführt ○ ES6 Module in Arbeit - Einbindung von Teilen von Ngeo ohne Verwendung von Closure Compiler ■ Angular 2 / Typescript ○ Evtl. später