SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
FOSS4G 2011, Denver, CO

                        Common pitfalls
                    for users of OpenLayers
                             Or:
              “Why are my features at the equator
                    when they shouldn't“


                    Marc Jansen, terrestris GmbH & Co. KG

2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   1
Table of contents
   ●   Introduction
   ●   Methodology
   ●   Common pitfalls
   ●   Homework
       or how to improve
       OpenLayers

                                                                     [pitfall]




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“               2
Introduction – about me
   ●   Marc Jansen
       ●   Developer and project manager
           @ terrestris
       ●   Frontend and
           OpenSource-GIS-Stack
       ●   Co-Author „OpenLayers —
           Webentwicklung mit dynami-
           schen Karten und Geodaten“
            (ISBN 978-3-937514-92-5)
       ●   Trunk committer OpenLayers
2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   3
Introduction – about terrestris
   ●   OpenSource WebGIS Technologies
       ●   Softwaredevelopment
       ●   Training & Consulting
       ●   OpenSource advocates
   ●   Geoportals, Geodata, Standards...
   ●   Partner of OpenGeo
   ●   Sponsoring FOSS4G, FOSSGIS
   ●   Associate member of OGC
2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   4
Introduction – this talk
   ●   This talk will deal with OpenLayers...


   ●   … a quick poll




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   5
Raise your hands, please


         Who knows OpenLayers



                                           ?
2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   6
Raise your hands, please


                 Who has developed
                 using OpenLayers


                                           ?
2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   7
Raise your hands, please


            Who knows the
       online API-documentation


                                           ?
2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   8
Raise your hands, please


            Who thinks the
       online API-documentation
              totally rocks

                                           ?
2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   9
Raise your hands, please




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   10
Methodology
   ●   This is not a scientific talk
   ●   Sources:
       ●   OpenLayers-User List                                  [userlist]

       ●   Stack Overflow                                        [stackoverflow]

       ●   Twitter                                               [twitter]

       ●   My experience




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“                 11
Vectors
   ●   Many problems circle around vectors in
       OpenLayers
       ●   Styling
       ●   Performance
       ●   Custom Select-Tools
       ●   Get Features from services
       ●   use cases range from easy to complex



2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“       12
Styling Vectors
   ●   You can set
       ●   style for a feature
       ●   style for a layer
       ●   stylemap for a layer
            –   render intents
            –   attributive '${statusClass}'
            –   rule based
   ●   Complex styling options


2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“     13
Performance of Vectors
   ●   Internet Explorer
       has big issues rendering
       many (> ~250) features
   ●   Usual suggestion
       ●   Raster layer for display
       ●   Limit features
       ●   Cluster strategies                                        [ie-logo]


       ●   Drop support for IE
           (often not an option)

2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“         14
Performance of Vectors




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   15
Custom Select-Tools for Vectors
   ●   Select by a box
       ●   { box: true }
   ●   Select by a polygon
       ●   { poly: true }
       ●   (currently not available!)




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   16
Getting Features from a service
    var kml = new OpenLayers.Layer.Vector("KML", {
        strategies: [
            new OpenLayers.Strategy.Fixed()
        ],
        protocol: new OpenLayers.Protocol.HTTP({
            url: "kml/sundials.kml",
            format: new OpenLayers.Format.KML({
                extractStyles: true,
                extractAttributes: true
            })
        })
    });


 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   17
Projections
   ●   Projections in OpenLayers
   ●   Reprojection of data
   ●   WMS in different projection




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“           18
Known Projections
   ●   Projections in OpenLayers
       ●   4326 and 900913
  new OpenLayers.Map( {
      projection : 'EPSG:31467',
      maxResolution: 30000,
      units: 'm',
      maxExtent: new OpenLayers.Bounds(
          3146150, 5223600, 4031150, 6108600
      )
  } );

2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   19
OpenLayers with another SRS




                                                                          [germany-wms]
2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   20
Reprojection of vectordata
    ●   Included:             4326              <=>           900913
    ●   Otherwise: Proj4 JS                          http://proj4js.org/
<script type=“text/javascript“ src=“path/to/proj4.js“></script>
<script type=“text/javascript“>
    Proj4js.defs["EPSG:31467"] = "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 …";
</script>
<script type=“text/javascript“>
    var geom = new OpenLayers.Geometry.Point(6.97, 50.95);
    geom.transform(
        new OpenLayers.Projection('EPSG:4326'),
        new OpenLayers.Projection('EPSG:31467')
    );
</script>



 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“        21
Reprojection of vectordata




                                                                          [germany-wms]
2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   22
Projections
   ●   My SRS URL-parameter is being ignored!
   ●   That's because
       ●   The baselayer determines the projection that will end
           up in the URL
       ●   or
       ●   The OpenLayers.Map-instance has a projection.




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“           23
API
   ●   Too complex for simple things
       ●   Popup, marker, tooltips, annotations
       ●   Compare to Leaflet (http://leaflet.cloudmade.com/)
       ●   http://crschmidt.net/blog/archives/497/demo-leafletopenlayers-translator/

   ●   Silent failures
   ●   Debug mode
   ●   Swapping of base library


2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“                24
Documentation
   ●   … or lack of documentation
   ●   … or in too many different places
       ●   e.g. Vector styling
   ●   Outdated examples
   ●   No inherited properties in API
   ●   Events / callback / arguments



2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   25
Performance
   ●   Vectors (see before)
   ●   Single file build / compressing
       ●   build/build.py and build/README.txt
       ●   http://openlayerer.appspot.com/
   ●   WMS tiling
   ●   Web Best practices
       (gzip, cssmin,
       header etc)

2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“      26
What wasn't a problem?
   ●   There were (surprisingly) very few questions
       related to
       ●   Same Origin Policy and proxy.cgi
       ●   Mobile
       ●   Browser X does Y instead of Z




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“   27
Homework
   ●   For OpenLayers
       ●   Better documentation (=> Codesprint Fr?)
       ●   Better API
   ●   For you
       ●   Tell us what is annoying
       ●   Send patches / edit on github
       ●   Get involved!



2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“         28
Thanks


                        Thank you
                    for your attention.

                              Questions?

2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“       29
Sources
   ●   [userlist]: http://lists.osgeo.org/pipermail/openlayers-users/
   ●   [stackoverflow]: http://stackoverflow.com/questions/tagged/openlayers
   ●   [twitter]: http://twitter.com/#!/selectoid/status/99382702867877888
   ●   [ie-logo]: http://paulirish.com/2010/high-res-browser-icons/
   ●   [germany-wms]:
       http://wms1.ccgis.de/cgi-bin/mapserv?MAP=/data/umn/germany/germany.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1

   ●   [pitfall]: http://www.flickr.com/photos/montage_man/394251850/ CC-BY 2.0 by joefoodie




2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“                                                           30
Imprint
   ●   Author:
       Marc Jansen                                      @selectoid
       terrestris GmbH & Co. KG                         http://terrestris.de/
       Irmintrudisstr. 17                               jansen@terrestris.de
       53111 Bonn, Germany
       Tel. +49 228 – 962 899 53                        Fax: +49 228 – 962 899 57


   ●   Licence of the slides:
       Creative Commons (by-sa) 2.0-Licence
       http://creativecommons.org/licenses/by-sa/2.0/


2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“              31

Weitere ähnliche Inhalte

Ähnlich wie Common pitfalls for users of OpenLayers

Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011François Scharffe
 
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011Datalift
 
Introduction to Open Source
Introduction to Open SourceIntroduction to Open Source
Introduction to Open SourceGluster.org
 
JOnAS Addons and the deployment for PaaS and SaaS applications
JOnAS Addons and the deployment for PaaS and SaaS applicationsJOnAS Addons and the deployment for PaaS and SaaS applications
JOnAS Addons and the deployment for PaaS and SaaS applicationsFlorent BENOIT
 
JOnAS Addons, OW2con 2011, Nov 24-25, Paris
JOnAS Addons, OW2con 2011, Nov 24-25, ParisJOnAS Addons, OW2con 2011, Nov 24-25, Paris
JOnAS Addons, OW2con 2011, Nov 24-25, ParisOW2
 
Maps4 finland 28.8.2012, olli rinne
Maps4 finland 28.8.2012, olli rinneMaps4 finland 28.8.2012, olli rinne
Maps4 finland 28.8.2012, olli rinneOlli Rinne
 
Maps4 finland 28.8.2012, olli rinne
Maps4 finland 28.8.2012, olli rinneMaps4 finland 28.8.2012, olli rinne
Maps4 finland 28.8.2012, olli rinneApps4Finland
 
Mark Hughes Annual Seminar Presentation on Open Source
Mark Hughes Annual Seminar Presentation on Open Source Mark Hughes Annual Seminar Presentation on Open Source
Mark Hughes Annual Seminar Presentation on Open Source Tracy Kent
 
ThinSWEClient - Visualising time series data with open source components.
ThinSWEClient - Visualising time series data with open source components.ThinSWEClient - Visualising time series data with open source components.
ThinSWEClient - Visualising time series data with open source components.Arne Bröring
 
OKFest: FabLab Project Documentation
OKFest: FabLab Project DocumentationOKFest: FabLab Project Documentation
OKFest: FabLab Project DocumentationAnu Maa
 
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...JISC GECO
 
Perl Testing Consideration (seen from other languages)
Perl Testing Consideration (seen from other languages)Perl Testing Consideration (seen from other languages)
Perl Testing Consideration (seen from other languages)Masaki Nakagawa
 
Applying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldApplying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldFederico Capoano
 
Efficient Data Assimilation with OpenDA
Efficient Data Assimilation with OpenDAEfficient Data Assimilation with OpenDA
Efficient Data Assimilation with OpenDAnilsvanvelzen
 
Eclipse Democamp Nantes 2017 - Back to the Future: EclipseConverge & Devoxx US
Eclipse Democamp Nantes 2017 - Back to the Future: EclipseConverge & Devoxx USEclipse Democamp Nantes 2017 - Back to the Future: EclipseConverge & Devoxx US
Eclipse Democamp Nantes 2017 - Back to the Future: EclipseConverge & Devoxx USmelbats
 
OER World Map Project
OER World Map Project OER World Map Project
OER World Map Project Robert Farrow
 
Software Defined Networking: The OpenDaylight Project
Software Defined Networking: The OpenDaylight ProjectSoftware Defined Networking: The OpenDaylight Project
Software Defined Networking: The OpenDaylight ProjectGreat Wide Open
 
GrenchMark at CCGrid, May 2006.
GrenchMark at CCGrid, May 2006.GrenchMark at CCGrid, May 2006.
GrenchMark at CCGrid, May 2006.Alexandru Iosup
 

Ähnlich wie Common pitfalls for users of OpenLayers (20)

Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
 
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
Datalift a-catalyser-for-the-web-of-data-fosdem-05-02-2011
 
Introduction to Open Source
Introduction to Open SourceIntroduction to Open Source
Introduction to Open Source
 
JOnAS Addons and the deployment for PaaS and SaaS applications
JOnAS Addons and the deployment for PaaS and SaaS applicationsJOnAS Addons and the deployment for PaaS and SaaS applications
JOnAS Addons and the deployment for PaaS and SaaS applications
 
JOnAS Addons, OW2con 2011, Nov 24-25, Paris
JOnAS Addons, OW2con 2011, Nov 24-25, ParisJOnAS Addons, OW2con 2011, Nov 24-25, Paris
JOnAS Addons, OW2con 2011, Nov 24-25, Paris
 
Maps4 finland 28.8.2012, olli rinne
Maps4 finland 28.8.2012, olli rinneMaps4 finland 28.8.2012, olli rinne
Maps4 finland 28.8.2012, olli rinne
 
Maps4 finland 28.8.2012, olli rinne
Maps4 finland 28.8.2012, olli rinneMaps4 finland 28.8.2012, olli rinne
Maps4 finland 28.8.2012, olli rinne
 
Mark Hughes Annual Seminar Presentation on Open Source
Mark Hughes Annual Seminar Presentation on Open Source Mark Hughes Annual Seminar Presentation on Open Source
Mark Hughes Annual Seminar Presentation on Open Source
 
ThinSWEClient - Visualising time series data with open source components.
ThinSWEClient - Visualising time series data with open source components.ThinSWEClient - Visualising time series data with open source components.
ThinSWEClient - Visualising time series data with open source components.
 
OKFest: FabLab Project Documentation
OKFest: FabLab Project DocumentationOKFest: FabLab Project Documentation
OKFest: FabLab Project Documentation
 
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...
Map Styling Tools and Interactive maps on the web with OpenLayers - Addy Pope...
 
Perl Testing Consideration (seen from other languages)
Perl Testing Consideration (seen from other languages)Perl Testing Consideration (seen from other languages)
Perl Testing Consideration (seen from other languages)
 
Applying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real worldApplying the Unix Philosophy to Django projects: a report from the real world
Applying the Unix Philosophy to Django projects: a report from the real world
 
Efficient Data Assimilation with OpenDA
Efficient Data Assimilation with OpenDAEfficient Data Assimilation with OpenDA
Efficient Data Assimilation with OpenDA
 
Eclipse Democamp Nantes 2017 - Back to the Future: EclipseConverge & Devoxx US
Eclipse Democamp Nantes 2017 - Back to the Future: EclipseConverge & Devoxx USEclipse Democamp Nantes 2017 - Back to the Future: EclipseConverge & Devoxx US
Eclipse Democamp Nantes 2017 - Back to the Future: EclipseConverge & Devoxx US
 
Openerp Rise Web
Openerp Rise WebOpenerp Rise Web
Openerp Rise Web
 
OER World Map Project
OER World Map Project OER World Map Project
OER World Map Project
 
Software Defined Networking: The OpenDaylight Project
Software Defined Networking: The OpenDaylight ProjectSoftware Defined Networking: The OpenDaylight Project
Software Defined Networking: The OpenDaylight Project
 
GrenchMark at CCGrid, May 2006.
GrenchMark at CCGrid, May 2006.GrenchMark at CCGrid, May 2006.
GrenchMark at CCGrid, May 2006.
 
20110728 datalift-rpi-troy
20110728 datalift-rpi-troy20110728 datalift-rpi-troy
20110728 datalift-rpi-troy
 

Mehr von FOSS4G 2011

Adapting remote sensing research for environmental monitoring: Citizen mappin...
Adapting remote sensing research for environmental monitoring: Citizen mappin...Adapting remote sensing research for environmental monitoring: Citizen mappin...
Adapting remote sensing research for environmental monitoring: Citizen mappin...FOSS4G 2011
 
OPen Source Web Test Engine for Geospatial Standards
OPen Source Web Test Engine for Geospatial StandardsOPen Source Web Test Engine for Geospatial Standards
OPen Source Web Test Engine for Geospatial StandardsFOSS4G 2011
 
Processing chains with OGC Web Processing Services to process satellite data ...
Processing chains with OGC Web Processing Services to process satellite data ...Processing chains with OGC Web Processing Services to process satellite data ...
Processing chains with OGC Web Processing Services to process satellite data ...FOSS4G 2011
 
Clip and Ship: MapServer for Data Distribution
Clip and Ship: MapServer for Data DistributionClip and Ship: MapServer for Data Distribution
Clip and Ship: MapServer for Data DistributionFOSS4G 2011
 
Advanced Cartography for the Web
Advanced Cartography for the WebAdvanced Cartography for the Web
Advanced Cartography for the WebFOSS4G 2011
 
Shortest Path Search with pgRouting
Shortest Path Search with pgRoutingShortest Path Search with pgRouting
Shortest Path Search with pgRoutingFOSS4G 2011
 

Mehr von FOSS4G 2011 (8)

Adapting remote sensing research for environmental monitoring: Citizen mappin...
Adapting remote sensing research for environmental monitoring: Citizen mappin...Adapting remote sensing research for environmental monitoring: Citizen mappin...
Adapting remote sensing research for environmental monitoring: Citizen mappin...
 
OPen Source Web Test Engine for Geospatial Standards
OPen Source Web Test Engine for Geospatial StandardsOPen Source Web Test Engine for Geospatial Standards
OPen Source Web Test Engine for Geospatial Standards
 
OpenAerialMap
OpenAerialMapOpenAerialMap
OpenAerialMap
 
Processing chains with OGC Web Processing Services to process satellite data ...
Processing chains with OGC Web Processing Services to process satellite data ...Processing chains with OGC Web Processing Services to process satellite data ...
Processing chains with OGC Web Processing Services to process satellite data ...
 
Clip and Ship: MapServer for Data Distribution
Clip and Ship: MapServer for Data DistributionClip and Ship: MapServer for Data Distribution
Clip and Ship: MapServer for Data Distribution
 
The FOSS4G Map
The FOSS4G MapThe FOSS4G Map
The FOSS4G Map
 
Advanced Cartography for the Web
Advanced Cartography for the WebAdvanced Cartography for the Web
Advanced Cartography for the Web
 
Shortest Path Search with pgRouting
Shortest Path Search with pgRoutingShortest Path Search with pgRouting
Shortest Path Search with pgRouting
 

Kürzlich hochgeladen

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Common pitfalls for users of OpenLayers

  • 1. FOSS4G 2011, Denver, CO Common pitfalls for users of OpenLayers Or: “Why are my features at the equator when they shouldn't“ Marc Jansen, terrestris GmbH & Co. KG 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 1
  • 2. Table of contents ● Introduction ● Methodology ● Common pitfalls ● Homework or how to improve OpenLayers [pitfall] 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 2
  • 3. Introduction – about me ● Marc Jansen ● Developer and project manager @ terrestris ● Frontend and OpenSource-GIS-Stack ● Co-Author „OpenLayers — Webentwicklung mit dynami- schen Karten und Geodaten“ (ISBN 978-3-937514-92-5) ● Trunk committer OpenLayers 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 3
  • 4. Introduction – about terrestris ● OpenSource WebGIS Technologies ● Softwaredevelopment ● Training & Consulting ● OpenSource advocates ● Geoportals, Geodata, Standards... ● Partner of OpenGeo ● Sponsoring FOSS4G, FOSSGIS ● Associate member of OGC 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 4
  • 5. Introduction – this talk ● This talk will deal with OpenLayers... ● … a quick poll 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 5
  • 6. Raise your hands, please Who knows OpenLayers ? 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 6
  • 7. Raise your hands, please Who has developed using OpenLayers ? 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 7
  • 8. Raise your hands, please Who knows the online API-documentation ? 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 8
  • 9. Raise your hands, please Who thinks the online API-documentation totally rocks ? 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 9
  • 10. Raise your hands, please 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 10
  • 11. Methodology ● This is not a scientific talk ● Sources: ● OpenLayers-User List [userlist] ● Stack Overflow [stackoverflow] ● Twitter [twitter] ● My experience 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 11
  • 12. Vectors ● Many problems circle around vectors in OpenLayers ● Styling ● Performance ● Custom Select-Tools ● Get Features from services ● use cases range from easy to complex 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 12
  • 13. Styling Vectors ● You can set ● style for a feature ● style for a layer ● stylemap for a layer – render intents – attributive '${statusClass}' – rule based ● Complex styling options 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 13
  • 14. Performance of Vectors ● Internet Explorer has big issues rendering many (> ~250) features ● Usual suggestion ● Raster layer for display ● Limit features ● Cluster strategies [ie-logo] ● Drop support for IE (often not an option) 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 14
  • 15. Performance of Vectors 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 15
  • 16. Custom Select-Tools for Vectors ● Select by a box ● { box: true } ● Select by a polygon ● { poly: true } ● (currently not available!) 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 16
  • 17. Getting Features from a service     var kml = new OpenLayers.Layer.Vector("KML", {         strategies: [             new OpenLayers.Strategy.Fixed()         ],         protocol: new OpenLayers.Protocol.HTTP({             url: "kml/sundials.kml",             format: new OpenLayers.Format.KML({                 extractStyles: true,                 extractAttributes: true             })         })     }); 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 17
  • 18. Projections ● Projections in OpenLayers ● Reprojection of data ● WMS in different projection 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 18
  • 19. Known Projections ● Projections in OpenLayers ● 4326 and 900913 new OpenLayers.Map( {     projection : 'EPSG:31467',     maxResolution: 30000,     units: 'm',     maxExtent: new OpenLayers.Bounds(         3146150, 5223600, 4031150, 6108600     ) } ); 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 19
  • 20. OpenLayers with another SRS [germany-wms] 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 20
  • 21. Reprojection of vectordata ● Included: 4326 <=> 900913 ● Otherwise: Proj4 JS http://proj4js.org/ <script type=“text/javascript“ src=“path/to/proj4.js“></script> <script type=“text/javascript“>     Proj4js.defs["EPSG:31467"] = "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 …"; </script> <script type=“text/javascript“>     var geom = new OpenLayers.Geometry.Point(6.97, 50.95);     geom.transform(         new OpenLayers.Projection('EPSG:4326'),         new OpenLayers.Projection('EPSG:31467')     ); </script> 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 21
  • 22. Reprojection of vectordata [germany-wms] 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 22
  • 23. Projections ● My SRS URL-parameter is being ignored! ● That's because ● The baselayer determines the projection that will end up in the URL ● or ● The OpenLayers.Map-instance has a projection. 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 23
  • 24. API ● Too complex for simple things ● Popup, marker, tooltips, annotations ● Compare to Leaflet (http://leaflet.cloudmade.com/) ● http://crschmidt.net/blog/archives/497/demo-leafletopenlayers-translator/ ● Silent failures ● Debug mode ● Swapping of base library 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 24
  • 25. Documentation ● … or lack of documentation ● … or in too many different places ● e.g. Vector styling ● Outdated examples ● No inherited properties in API ● Events / callback / arguments 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 25
  • 26. Performance ● Vectors (see before) ● Single file build / compressing ● build/build.py and build/README.txt ● http://openlayerer.appspot.com/ ● WMS tiling ● Web Best practices (gzip, cssmin, header etc) 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 26
  • 27. What wasn't a problem? ● There were (surprisingly) very few questions related to ● Same Origin Policy and proxy.cgi ● Mobile ● Browser X does Y instead of Z 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 27
  • 28. Homework ● For OpenLayers ● Better documentation (=> Codesprint Fr?) ● Better API ● For you ● Tell us what is annoying ● Send patches / edit on github ● Get involved! 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 28
  • 29. Thanks Thank you for your attention. Questions? 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 29
  • 30. Sources ● [userlist]: http://lists.osgeo.org/pipermail/openlayers-users/ ● [stackoverflow]: http://stackoverflow.com/questions/tagged/openlayers ● [twitter]: http://twitter.com/#!/selectoid/status/99382702867877888 ● [ie-logo]: http://paulirish.com/2010/high-res-browser-icons/ ● [germany-wms]: http://wms1.ccgis.de/cgi-bin/mapserv?MAP=/data/umn/germany/germany.map&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1 ● [pitfall]: http://www.flickr.com/photos/montage_man/394251850/ CC-BY 2.0 by joefoodie 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 30
  • 31. Imprint ● Author: Marc Jansen @selectoid terrestris GmbH & Co. KG http://terrestris.de/ Irmintrudisstr. 17 jansen@terrestris.de 53111 Bonn, Germany Tel. +49 228 – 962 899 53 Fax: +49 228 – 962 899 57 ● Licence of the slides: Creative Commons (by-sa) 2.0-Licence http://creativecommons.org/licenses/by-sa/2.0/ 2011-09-14 | FOSS4G 2011 | M. Jansen: „Common OpenLayers pitfalls“ 31