I would like to know if it is possible (and if so how) to style the zoom controls purely using css (i.e. not using images). This can be seen in examples on the Openlayers website:


I'm guessing this is a different control from the zoomPanel used in the Drupal module as it offers '+' and '-' symbols for styling and has no zoomToMaxExtent button. It would be good if this was available.


#1 css_only_zoom_control-1992066-1.patch436 bytesleveller
Members fund testing for the Drupal project. Drupal Association Learn more


leveller’s picture

Issue summary: View changes
436 bytes

Not passing in the empty controls aray as part of the options (openlayers/js/openlayers.js) allows the default controls to be rendered. These can be styled using css alone as they consist simply of divs containing + and - characters. If you still want to use the buttons (for some reason) these divs can be hidden.