Month: March 2011

OpenLayers: Can a base layer of WMS type be transparent?

Posted by – Wednesday 2011-03-30

I am about to teach an introductory course on GIS. One of the taught subjects is the OpenLayers library. Part of the course consists on exercises that the attendees will have to complete. Obviously, the very first OpenLayers exercise is creating a very simple map viewer.

Unexpectedly, I had problems with this simple example. The JavaScript code is shown below; the line causing the problem is highlighted:

// OpenLayers version: 2.10
function initMap() {
	var WMS_SERVER = 'http://path/to/wms-server';

	var map = new OpenLayers.Map('map', {
		'projection': 'epsg:...',
		'units': 'm',
		'maxExtent': new OpenLayers.Bounds(..., ..., ..., ...),
		'maxResolution': 'auto'
	});

	var layer = new OpenLayers.Layer.WMS('municipalities', WMS_SERVER, {
		'layers': 'municipalities',
		'format': 'image/png',
                'transparent': true
	});

	map.addLayer(layer);
	map.zoomToMaxExtent();
}

More…

Die, IE6, die: the IE6 countdown.

Posted by – Monday 2011-03-07

Once upon a time, after the first web browsers war, Microsoft’s Internet Explorer 6 (IE6) was the king of the web browsers. IE6 was the most used one, given not only its technical merits but also the dominance of Microsoft on the desktop operating system arena and its anticompetitive practices.

Bill Gates, the United States v. Microsoft trial

Bill Gates, USA v. Microsoft Trial (picture taken from Wikipedia.org)

IE6, as well as IE5, was a pain for web developers – like me – because of its many and intentional incompatibilities. The additional work needed to make a website viewable with IE6 was error prone, frustrating and time consuming.

The first IE6 beta version was realeased in March 2001. About 51 months later, the first beta of the next major version was released. Meanwhile, IE6 also became obsolete: for instance, other web browsers like Firefox, Opera or Safari featured tabbed browsing or full support for PNG format images, while IE6 didn’t.

More…