[OpenLayers-Users] Changes themes breaks stuff
Stephen Woodbridge
woodbri at swoodbridge.com
Fri Apr 20 09:37:40 EDT 2007
Christopher Schmidt wrote:
> On Fri, Apr 20, 2007 at 12:03:02AM -0400, Stephen Woodbridge wrote:
>>
>> So one more question then its time for sleep, Is it possible to
>> tell OL to use an alternate theme? How?
>
> Pass a 'theme' option to the map, with the web-location of a
> replacement stylesheet. The default OL stylesheet is in
> theme/default/style.css, for which properties you can change. (It's
> significantly fewer than I would like.)
>
> Regards,
Christopher,
I tried to change the theme and I got some breakage. I created a new
directory map-styles/ (see listing below) can copied the OL/theme and
OL/img trees into it, the edited the style.css and included the theme in
my map initialization.
The results are here:
http://imaptools.com/ld-testv.html - original
http://imaptools.com/ld-testv2.html - new theme
1) The layer switcher min/max button it positioned correctly visually,
but the active click area has move all the way to the right edge of the
viewport.
2) Scale Control move to the left, but not to the bottom
3) OverviewMap min/max button does not move to the bottom
4) I tried to push the PanZoomBar down a few pixels by adding:
.olControlPanZoomBar {
position: absolute;
left: 4px;
top: 10px;
}
But this does not seem to be supported yet.
-Steve
Listing of map-styles/ dir:
map-styles/img/blank.gif
map-styles/img/close.gif
map-styles/img/drag-rectangle-off.png
map-styles/img/drag-rectangle-on.png
map-styles/img/east-mini.png
map-styles/img/layer-switcher-maximize.png
map-styles/img/layer-switcher-minimize.png
map-styles/img/marker-blue.png
map-styles/img/marker-gold.png
map-styles/img/marker-green.png
map-styles/img/marker.png
map-styles/img/measuring-stick-off.png
map-styles/img/measuring-stick-on.png
map-styles/img/north-mini.png
map-styles/img/panning-hand-off.png
map-styles/img/panning-hand-on.png
map-styles/img/slider.png
map-styles/img/south-mini.png
map-styles/img/west-mini.png
map-styles/img/zoom-minus-mini.png
map-styles/img/zoom-plus-mini.png
map-styles/img/zoom-world-mini.png
map-styles/img/zoombar.png
map-styles/theme/default/style.css
map-styles/theme/default/img/add_point_off.png
map-styles/theme/default/img/add_point_on.png
map-styles/theme/default/img/drag-rectangle-off.png
map-styles/theme/default/img/drag-rectangle-on.png
map-styles/theme/default/img/draw_line_off.png
map-styles/theme/default/img/draw_line_on.png
map-styles/theme/default/img/draw_point_off.png
map-styles/theme/default/img/draw_point_on.png
map-styles/theme/default/img/draw_polygon_off.png
map-styles/theme/default/img/draw_polygon_on.png
map-styles/theme/default/img/move_feature_off.png
map-styles/theme/default/img/move_feature_on.png
map-styles/theme/default/img/pan_off.png
map-styles/theme/default/img/pan_on.png
map-styles/theme/default/img/panning-hand-off.png
map-styles/theme/default/img/panning-hand-on.png
map-styles/theme/default/img/remove_point_off.png
map-styles/theme/default/img/remove_point_on.png
More information about the Users
mailing list