Permit custom styling by setting theme:null in map.options and including the theme CSS manually. Fixes #460.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2844 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -175,11 +175,14 @@ OpenLayers.Map.prototype = {
|
||||
//set the default options
|
||||
this.setOptions(options);
|
||||
|
||||
var cssNode = document.createElement('link');
|
||||
cssNode.setAttribute('rel', 'stylesheet');
|
||||
cssNode.setAttribute('type', 'text/css');
|
||||
cssNode.setAttribute('href', this.theme);
|
||||
document.getElementsByTagName('head')[0].appendChild(cssNode);
|
||||
// only append link stylesheet if the theme property is set
|
||||
if(this.theme) {
|
||||
var cssNode = document.createElement('link');
|
||||
cssNode.setAttribute('rel', 'stylesheet');
|
||||
cssNode.setAttribute('type', 'text/css');
|
||||
cssNode.setAttribute('href', this.theme);
|
||||
document.getElementsByTagName('head')[0].appendChild(cssNode);
|
||||
}
|
||||
|
||||
this.layers = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user