Download presentation
Presentation is loading. Please wait.
Published byGyles Clark Modified over 8 years ago
1
Guofeng Cao CyberInfrastructure and Geospatial Information Laboratory Department of Geography National Center for Supercomputing Applications (NCSA) University of Illinois at Urbana-Champaign Geog 480: Principles of GIS
2
What is OpenLayers?
3
An API for building web map applications
4
What is OpenLayers? An API for building web map applications Pure client-side JavaScript
5
What is OpenLayers? An API for building web map applications Pure client-side JavaScript “AJAX”
6
What is OpenLayers? An API for building web map applications Pure client-side JavaScript “AJAX” “Web 2.0”
7
What is OpenLayers? An API for building web map applications Pure client-side JavaScript “AJAX” “Web 2.0”
8
What is OpenLayers? An API for building web map applications Pure client-side JavaScript “AJAX” Supports open standards
9
What is OpenLayers? An API for building web map applications Pure client-side JavaScript “AJAX” Supports open standards Supports closed standards, too
10
What is OpenLayers? An API for building web map applications Pure client-side JavaScript “AJAX” Supports open standards Supports closed standards, too BSD licensed
11
Quick Demonstration Tiling Zoom in/out Panning Zoom Box!
12
History of the Project Started after Where 2.0 in 2005
13
History of the Project Started after Where 2.0 in 2005 Motivated by MetaCarta's business needs
14
History of the Project Started after Where 2.0 in 2005 Motivated by MetaCarta's business needs Went through several internal revisions
15
History of the Project Started after Where 2.0 in 2005 Motivated by MetaCarta's business needs Went through several internal revisions Final rewrite took only a month
16
History of the Project Started after Where 2.0 in 2005 Motivated by MetaCarta's business needs Went through several internal revisions Final rewrite took only a month Released before Where 2.0 in 2006
17
History of the Project Started after Where 2.0 in 2005 Motivated by MetaCarta's business needs Went through several internal revisions Final rewrite took only a month Released before Where 2.0 in 2006 Already used by > 10,000 people
18
OpenLayers Features: Layers OGC WMS OGC WFS GeoRSS CSV ka-Map WorldWind (*) Canvas Google Maps MSN Virtual Earth Yahoo! Maps Multimap
19
OpenLayers Features: Controls Zoom / Pan Zoom Bar Mouse controls Layer Switcher (aka “legend”) Scale Ratio Scale Bar Permalink
20
OpenLayers Features: et cetera... Markers Popups Feature objects Event handling... and, of course...
21
OpenLayers Features: et cetera... Markers Popups Feature objects Event handling “AJAX”
22
OpenLayers: WMS var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent();
23
OpenLayers: WMS var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent();
24
OpenLayers: WMS var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent();
25
OpenLayers: WMS var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent();
26
OpenLayers: WMS var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent();
27
OpenLayers: WMS var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}); map.addLayer(wms); map.zoomToMaxExtent();
28
OpenLayers: WMS (demo)
29
Google Maps in OpenLayers var map = new OpenLayers.Map('map'); var layer = new OpenLayers.Layer.Google("Google Streets"); map.addLayer(layer); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var layer = new OpenLayers.Layer.Google("Google Streets"); map.addLayer(layer); map.zoomToMaxExtent();
30
Google Maps in OpenLayers (demo)
31
Commercial Layers in OpenLayers Additionally, OpenLayers supports...
32
Commercial Layers in OpenLayers Y! Maps Additionally, OpenLayers supports...
33
Commercial Layers in OpenLayers Y! Maps MultiMap Additionally, OpenLayers supports...
34
Commercial Layers in OpenLayers Live Maps Y! Maps MultiMap (insert your own here) Additionally, OpenLayers supports...
35
OpenLayers: Transparent WMS var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); var twms = new OpenLayers.Layer.WMS( "World Map", "http://world.freemap.in/cgi-bin/mapserv?", {map: '/www/freemap.in/world/map/factbooktrans.map', transparent:'true', layers: 'factbook', 'format':'png'} ); map.addLayers([wms,twms]); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); var twms = new OpenLayers.Layer.WMS( "World Map", "http://world.freemap.in/cgi-bin/mapserv?", {map: '/www/freemap.in/world/map/factbooktrans.map', transparent:'true', layers: 'factbook', 'format':'png'} ); map.addLayers([wms,twms]); map.zoomToMaxExtent();
36
OpenLayers: Transparent WMS (demo)
37
OpenLayers: Markers var map = new OpenLayers.Map('map'); var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(markers); var point = new OpenLayers.LonLat(5, 40) var marker = new OpenLayers.Marker(point); markers.addMarker(marker); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(markers); var point = new OpenLayers.LonLat(5, 40) var marker = new OpenLayers.Marker(point); markers.addMarker(marker); map.zoomToMaxExtent();
38
OpenLayers: Markers var map = new OpenLayers.Map('map'); var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(markers); var point = new OpenLayers.LonLat(5, 40) var marker = new OpenLayers.Marker(point); markers.addMarker(marker); map.zoomToMaxExtent(); var map = new OpenLayers.Map('map'); var markers = new OpenLayers.Layer.Markers("Markers"); map.addLayer(markers); var point = new OpenLayers.LonLat(5, 40) var marker = new OpenLayers.Marker(point); markers.addMarker(marker); map.zoomToMaxExtent();
39
OpenLayers: Markers (demo)
40
OpenLayers: WMS + Google Map var map = new OpenLayers.Map("map"); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://geog480.cigi.illinois.edu:8080/geoserver/opengeo/wms?", {layers: "opengeo:postgis_states_conner7", transparent:'true'},{"reproject":"true",projection: new OpenLayers.Projection("EPSG:900913")}); var layer = new OpenLayers.Layer.Google("Google Streets", {isBaseLayer:'true'}); map.addLayers([wms,layer]); map.zoomToMaxExtent(); map.zoomToMaxExtent(); var map = new OpenLayers.Map("map"); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://geog480.cigi.illinois.edu:8080/geoserver/opengeo/wms?", {layers: "opengeo:postgis_states_conner7", transparent:'true'},{"reproject":"true",projection: new OpenLayers.Projection("EPSG:900913")}); var layer = new OpenLayers.Layer.Google("Google Streets", {isBaseLayer:'true'}); map.addLayers([wms,layer]); map.zoomToMaxExtent(); map.zoomToMaxExtent();
41
OpenLayers: WMS + Google Map var map = new OpenLayers.Map("map"); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://geog480.cigi.illinois.edu:8080/geoserver/opengeo/wms?", {layers: "opengeo:postgis_states_conner7", transparent:'true'},{"reproject":"true",projection: new OpenLayers.Projection("EPSG:900913")}); var layer = new OpenLayers.Layer.Google("Google Streets", {isBaseLayer:'true'}); map.addLayers([wms,layer]); map.zoomToMaxExtent(); map.zoomToMaxExtent(); var map = new OpenLayers.Map("map"); var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://geog480.cigi.illinois.edu:8080/geoserver/opengeo/wms?", {layers: "opengeo:postgis_states_conner7", transparent:'true'},{"reproject":"true",projection: new OpenLayers.Projection("EPSG:900913")}); var layer = new OpenLayers.Layer.Google("Google Streets", {isBaseLayer:'true'}); map.addLayers([wms,layer]); map.zoomToMaxExtent(); map.zoomToMaxExtent();
42
www.openlayers.org Examples: http://openlayers.org/dev/examples/http://openlayers.org/dev/examples/ A WebGIS crash course by Eric Shook: http://www.cigi.illinois.edu/eshook/webgis/ http://www.cigi.illinois.edu/eshook/webgis/
43
Further info
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.