[OpenLayers-Users] New Features

Christopher Schmidt crschmidt at crschmidt.net
Fri Jun 30 22:14:44 CDT 2006


Couple new features tonight:

 * OpenLayers.Control.Permalink
   map.addControl(new OpenLayers.Control.Permalink())); or 
   map.addControl(new OpenLayers.Control.Permalink($('plElement'))); or 
   map.addControl(new OpenLayers.Control.Permalink($('plElement'),
                      '/edit.html'));

   This control is designed to update links when the map is dragged.
   
   The first creates its own element -- a link in the lower right of the
   map div. The second updates the href on a given element. Both of
   these are visible on http://openlayers.org/dev/examples/controls.html

   The last uses the given snippet as a base ref -- good for when you
   want to link to, for example, an editing interface as well as the
   normal interface.

   As you can see in controls.html, you can check if the map.getCenter()
   is set before doing your centering/zooming -- the Permalink control
   will automatically center your map if the lat, lon, zoom params are
   set.

 * OpenLayers.Layer.Grid.setParams():
   This allows you to change a param of your Gridded image request. The
   motivator for this one was
   http://openlayers.org/dev/examples/wmst.html -- WMS-T support for
   radar. Update the time, hit enter, and the layer params change, and
   the tiles are reinitialized.

I also added tests for the GeoRSS Layer, as well as tests for the new
Control class, and setParams function. 

Feedback on API, etc. is welcome.

-- 
Christopher Schmidt
Web Developer


More information about the Users mailing list