OpenLayers Blog

All the maps that are fit to blog

OpenLayers 2.6 Release

April 15th, 2008 by crschmidt · 4 Comments

The OpenLayers Development Team is proud to announce release of OpenLayers 2.6. As of this final release, the OpenLayers 2.6 release closes 294 outstanding tickets. This is the largest of any OpenLayers release to date. This release features a number of major developments, including:

  • Integration of the CloudAmber “Google Like” popups for advanced visual display of information in popups
    • Resulting improvements throughout all popup code, including autosizing popups to the content they contain.
  • Improved panning of commercial layers like Google Maps and Yahoo! Maps
  • Animated panning of the map, using OpenLayers.Tween support
  • Layer Image transitions, for keeping images visible when zooming to allow smoother transitions
  • Client side reprojection support using built in transformations for spherical mercator, or the proj4js library for other projections.
    • Support for reprojecting vector data layers
    • Support for reprojecting user-facing controls like mouseposition
    • Support for programatically reprojecting points and geometries
  • Improved OpenLayers Styling, including:
    • OpenLayers.Style, OpenLayers.StyleMap, OpenLayers.Rule support for improved feature-attribute based styling
    • SLD read/write support
  • Support for reading and writing multiple versions of WMC.
  • Improved KML support, including KML styling support.
  • Improved GeoRSS Format support, including GeoRSS GML read support.
  • New ScaleLine Control for displaying visual scale
  • New NavigationHistory control for map history navigation
  • Localization/Better Internationalization support
  • Layer support for MapGuide Open Source
  • A number of new / improved handlers to make handling user interactions easier

A thank you again to all the people who helped to make this release happen.

Regards,

The OpenLayers Team

→ 4 CommentsTags: Uncategorized

Vector Behavior

April 15th, 2008 by Tim Schaub · 3 Comments

Since 2.6 is almost here, I thought it was time to look to the future again. OpenLayers currently packs a lot into its Layer classes. This is handy. It also makes it a bit hard to reuse parts of the library in areas that the original developer might not have anticipated. We’ve been improving on this with Handler and Format classes. Now it’s time to start tearing apart vector layers.

I’ve started extracting out vector layer behavior in a sandbox (that will be gone in 6 months or so). A simple example demonstrates the differences. See the old GML layer in action and compare to the new Vector2 layer with behavior. Both are pretty boring and do just about the same thing.

In the new design, instead of creating a layer like:

var layer = new OpenLayers.Layer.GML(“GML”, “gml/polygon.xml”);

The vector behavior example (v2-fixed-http-gml.html) does the following:

var layer = new OpenLayers.Layer.Vector2(“GML”, {
strategy: new OpenLayers.Strategy.Fixed(),
protocol: new OpenLayers.Protocol.HTTP({url: “gml/polygon.xml”}),
format: new OpenLayers.Format.GML()
});

Looks horrible, right? And the example name is so long and tedious as well.

The point is that the existing GML layer wraps up a bunch (well, a bit) of vector behavior into a single class. The GML layer requests all data once (that’s a strategy), it uses HTTP (that’s a protocol), and it parses responses as GML (that’s a format).

The new design separates strategy, protocol, and format. A strategy is tied to a layer (it has a reference to a layer and can only be used with a layer). A protocol is tied to a format (it has a reference to a format). You can swap out the format for a protocol (in theory) and you can use a protocol in the absence of a layer.

The result is that we can use these parts elsewhere. People can mix and match as they like. We can develop new strategies, protocols, and formats independently – assumptions about how they are integrated doesn’t need to be tied up in a layer.

Then, of course, we can make things convenient again. The GML layer can use a Fixed strategy, an HTTP protocol, and a GML format. The WFS layer can use a BBOX strategy, a WFS protocol, and a GML format. We can create strategies that automatically send updates as features are modified, we can create layers that use the AtomPub protocol, we can create layers that use a protocol to talk to client-side storage, etc.

→ 3 CommentsTags: Features · Future · Vector

OpenLayers Summer of Code

March 18th, 2008 by crschmidt · Comments Off

OSGeo announced yesterday that it had been accepted to the Summer of Code project from Google:

OSGeo is pleased to announce that Google has accepted OSGeo as mentoring organization for the Google Summer of Code 2008 program. This program provides funding for students to work on open source projects under the support of experienced mentors. The projects participating through OSGeo are OpenLayers, GDAL, GRASS, Mapbender, Quantum GIS, MapServer, GeoServer, GeoTools, uDig, OpenJUMP/Degree.

OpenLayers being in this list means that we can accept student proposals for SoC Projects starting next week. We’ve got our list of ideas, but of course, we accept students proposing their own ideas as well!

If you’re interested or curious, please feel free to drop us a line, either on the Developers mailing list or by stopping by on irc.freenode.net / #openlayers.

Comments OffTags: Uncategorized

Smooth Navigation II (Google Style)

March 12th, 2008 by Tim Schaub · 1 Comment

If you’ve considered using the Google Layer in OpenLayers but decided against it because of that annoying flicker and weirdly jerky and sluggish drag-panning, have another look. Google started exporting a getDragObject in version 2.93. This was exactly what we needed, and it let us ditch the obfuscated non-API methods that we were relying on for getting around the flicker (we only had a workaround for version 2.82).

So now, in addition to nice animated panning and smooth zoom transitions, if you’re a Google Layer user, you get flicker free panning.

→ 1 CommentTags: Features

Smooth Navigation

March 6th, 2008 by Tim Schaub · Comments Off

The upcoming 2.6 release will have a couple of nice visual enhancements for map navigation. The first is a map.panTo method which uses easing methods to slide the map to a new center. The second is layer transitions, which (in their current form) resize existing tiles while waiting for new tiles to load – giving users something to look at while new data comes down. Future layer transitions will include animated zooming with the same sort of easing methods as the smooth panning.

Both enhancements can be seen in the transition example. Smooth panning is enabled by default, use the pan buttons to see the map ease to a new location. The map panMethod options lets you control the type of easing (or turn it off).

The layer transitions are controlled on a layer by layer basis. Open the layer switcher on the above example to see the “resize” transition for single-tile and multi-tile layers (zoom and pan to see the effect).

Thanks to Pierre Giraud (Camptocamp) for leading the easing/smooth panning effort, and thanks to Paul Spencer (DM Solutions) for taking on layer transitions.

Comments OffTags: Features

The Open Geo-Stack: OpenLayers, GeoServer, PostGIS @ Where 2.0

March 3rd, 2008 by crschmidt · Comments Off

The Where 2.0 Preliminary Agenda has been published: avid users of OpenLayers will notice The Open Geo-Stack: OpenLayers, GeoServer, PostGIS available as a half day Tutorial, at 1:30pm Monday, 05/12/2008:

An open geo-stack offers a flexible and feature filled solution for your web mapping needs. Store your data with PostGIS, set up GeoServer to publish it, and develop an OpenLayers based client for the browser. This tutorial will focus on these three core components of an open source geo-stack and will also cover architectures that cross the proprietary/open source divide.

If you’re interested in learning more about the complete stack of open source software you can use to publish geographic data over the web with versioning, interested in learning a bit more about the server behind some OpenLayers applications, or just want to refresh yourself on the technology around OpenLayers in general, this looks like it may of interest if you plan to be at Where 2.0.

Comments OffTags: Conferences

MapGuide 2.0: Fusion

March 2nd, 2008 by crschmidt · 1 Comment

MapGuide 2.0 was Released on Thursday, with the main feature being:

the integration of Fusion; a flexible, extensible templating system that provides the ability to separate application presentation from its functional components

More information on Fusion is available from DM Solutions. Fusion uses OpenLayers as its mapping layer, and the recent addition of the MapGuide layer to OpenLayers trunk was as a result of the efforts put forth by DM Solutions to help contribute back improvements made to OpenLayers for its use within Fusion.

You can see examples of Fusion in action on the MapGuide Beta site.

Congrats to the MapGuide team on their success in using OpenLayers to build a great looking frontend for MapGuide maps!

→ 1 CommentTags: Demos · Users

Debugging OpenLayers

February 22nd, 2008 by Tim Schaub · 1 Comment

Well, this is really about debugging any web app in a browser. Firebug, obviously, is critical to JavaScript development. Having a full featured debugger makes us a bit less embarrassed about using the term development in conjunction with JavaScript. Alas, the world does not run on Firefox.

Firebug Lite is an acceptable cross-browser solution. In OpenLayers, we include a patched version that works a bit better in IE. While nothing like a debugger, Firebug Lite provides simple command-line access outside of Firefox.
My new favorite for work outside of Firefox is Jash. Especially handy is the little bookmarklet (drag to your bookmarks). Open up a page with a map, click your Jash bookmarklet, and start exploring.  This is particularly nice for remote debugging.
>> map [object Object]
>> map.layers.length
3

Start typing map.getZ and hit tab for completion, see

2. getZoom
3. getZoomForExtent
4. getZoomForResolution

Hit Ctrl-X and mouse over the elements to see the DOM hierarchy. Enter jash.help() for more.

→ 1 CommentTags: Debugging

NYC Sprint Recap

February 15th, 2008 by Tim Schaub · Comments Off

Last week, The Open Planning Project graciously hosted a two day OpenLayers sprint in their New York office. Chris Schmidt and Erik Uzureau (of MetaCarta) came down from Boston, Andreas Hocevar crossed the Atlantic to join us from Austria, I (Tim Schaub) dug my way out of my Northern Rockies bunker, and a few of the TOPP locals joined in from their usual posts.

Our general goal was to get the trunk in shape for the upcoming 2.6 release. In addition, we took advantage of the dedicated time to squeeze in some new features. Andreas continued to work on his excellent style work, adding a new StyleMap class for use with vector layers. Erik pulled an all-nighter conjuring up beautiful popups. I tweaked event handling and Chris closed 372 tickets. Sebastian Benthall (TOPP) contributed numerous fixes from their slick collaborative mapping application, and Tim Coulter (TOPP) put together nice code for customizing vector graphic z-indexing.

The upcoming 2.6 release is looking even more feature rich than the last. Thanks to all who have contributed. Special thanks to Erik for initiating the sprint and to The Open Planning Project for hosting us in style.

Comments OffTags: Uncategorized

OpenLayers 2.5 Released

October 9th, 2007 by crschmidt · Comments Off

OpenLayers 2.5 has been released.

As of this final release, the OpenLayers 2.5 release closes 190 outstanding tickets, more than any other OpenLayers release to date! For this we are indebted to the many members of the community, and especially the hard work of organizations like The Open Planning Project via Tim Schaub and a number of developers like Pierre Giraud, Eric Lemoine, and Fred Junrod of the Camptocamp team, as well as continued support from Chris Schmidt and Erik Uzureau of MetaCarta.

Many thanks to all who have helped make this release so great. Now on to new features! SLD, client side reprojection, improved documentation and examples, tile transitions… so many neat things that 2.6 will hopefully bring.

Comments OffTags: Release