Commit changes to code for skinning, including doc/customization, which
documents the class style naming for OL, although it isn't implemented yet, so that we have a standard to work against. Update release scripts, tests, and create a 'theme' directory which will hold theme information as it is developed. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1639 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -111,6 +111,8 @@ OpenLayers.Map.prototype = {
|
||||
/** @type int */
|
||||
numZoomLevels: 16,
|
||||
|
||||
/** @type string */
|
||||
theme: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -158,6 +160,12 @@ 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);
|
||||
|
||||
this.layers = [];
|
||||
|
||||
@@ -217,6 +225,9 @@ OpenLayers.Map.prototype = {
|
||||
|
||||
this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90);
|
||||
|
||||
this.theme = OpenLayers._getScriptLocation() +
|
||||
'theme/default/style.css';
|
||||
|
||||
// now add the options declared by the user
|
||||
// (these will override defaults)
|
||||
OpenLayers.Util.extend(this, options);
|
||||
|
||||
Reference in New Issue
Block a user