1 <html xmlns="http://www.w3.org/1999/xhtml">
3 <title>Custom Style Example</title>
5 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
6 <link rel="stylesheet" href="style.css" type="text/css" />
7 <style type="text/css">
11 div.olControlMousePosition {
17 <script src="../lib/OpenLayers.js"></script>
18 <script type="text/javascript">
25 var options = {theme: null};
26 map = new OpenLayers.Map('map', options);
27 layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
28 "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
30 map.addControl(new OpenLayers.Control.MousePosition());
32 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
36 <body onload="init()">
37 <h1 id="title">Custom Style Example</h1>
43 Demonstrate changing CSS styles on controls in the OpenLayers window.
46 <div id="map" class="smallmap"></div>
49 <p>If you care to modify the style of any OpenLayers element, include
50 the default stylesheet as a link and declare any style modifications
51 below that link. These style declarations can be in other linked
52 stylesheets or in style tags. In addition, construct your map with
53 options that include {theme: null}. This will disable the default
54 method of loading the stylesheet and allow you to declare style rules
55 in your own linked stylesheets or style tags.</p>
56 <p>This example shows how to declare the font family, size, and color
57 for the mouse position. Note that only the style keys that you want to
58 modify (change from the default) need to be specified.</p>