Integrating OpenLayers with GeoExt

From OSGeo
Jump to: navigation, search

PDX-OSGEO: Session 5 - Integrating OpenLayers with GeoExt

Percy gives a guided tour of an Openlayers + GeoExt App developed for the Metropolitan Knowledge Network (http://mkn.research.pdx.edu)

To see one of the maps click on a census article (maps are embedded below each article)

example: http://mkn.research.pdx.edu/2011/01/census-data-show-regional-disparities-in-educational-attainment/

uses geoext v1.0 good example - uses esri tile cache

    • Note geoext / ext (not 100% sure which one he was talking about) has a dual license so be aware - percy said if you modify and dont contribute back it specifies a fee of something like $400


Tour of How to set up all the map components in OpenLayers

first array in wms layer definition gets passed to WMS service second array in wms layer gets passed to OPENLAYERS

What is a Layer in OpenLayers? Javascript definition of where a data service is, and parameters for defining what data you want to retrieve from hat service, and how you want to control or display it...

Layer Types

  • WMS
  • Mapserver
  • XYZ - deals with tile cache layers (arcgis server allows you to render out to a tile set - same as google maps tile set)
  • esri has a online tile cache you can use
  (services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/Mapserver/tile/$(z)/$(y)/$(x)

WEB Mercator / Spherical Mercator

OGR2OGR - used to spit out a json file

test map has a transparency slider

there is a limitation on client side drawing points


Tour of GeoExt: Load ExtJS Library, Load GeoExt library

Use GeoExt to provide map interface components like Legend, Layer Opacity slider, attribute display tables (including sorting of columns), zoom to feature functions (grid select model)

check out the interface2.js file at [1] for the simple interface Percy was touring through..

for open source and geoext examples (look at the js for openlayers config file)

    • his example uses a style map declaration
    • if its selected, change outside color to this color (straight open layers)
    • vector legend provided by geoext
    • opacity slider is an ext thing
    • pulls from both ext and geoext
    • stopDown openlayers method allows the app to stop mouse clickthrough the map - like in the case of a highlighted polygon


Quickie list of topics for future PDX-OSGEO meetings

in depth:

- GRASS

- GeoExt

- Python

Percy proposed a quarterly in depth friday - maybe we should poll on the popularity of which topic should be first


Return to [ http://wiki.osgeo.org/wiki/PDX-OSGEO#Unconference_Sessions 2011 Unconference Sessions].