Update zoom example to demonstrate custom style.

This commit is contained in:
Tim Schaub
2012-03-02 23:51:39 -07:00
parent f45043967b
commit c6650087cc
3 changed files with 56 additions and 4 deletions

View File

@@ -54,8 +54,7 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, {
* Method: draw
*
* Returns:
* {DOMElement} A reference to the DIV DOMElement containing the
* switcher tabs.
* {DOMElement} A reference to the DOMElement containing the zoom links.
*/
draw: function() {
var div = OpenLayers.Control.prototype.draw.apply(this),
@@ -81,7 +80,8 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, {
* {Object} Object with zoomIn and zoomOut properties referencing links.
*/
getOrCreateLinks: function(el) {
var zoomIn = document.getElementById(this.zoomInId);
var zoomIn = document.getElementById(this.zoomInId),
zoomOut = document.getElementById(this.zoomOutId);
if (!zoomIn) {
zoomIn = document.createElement("a");
zoomIn.href = "#zoomIn";
@@ -89,7 +89,6 @@ OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, {
zoomIn.className = "olControlZoomIn";
el.appendChild(zoomIn);
}
var zoomOut = document.getElementById(this.zoomOutId);
if (!zoomOut) {
zoomOut = document.createElement("a");
zoomOut.href = "#zoomOut";