[OpenLayers-Users] How do I show a Control.ZoomBox tool icon in a Control.Panel ???

Brendan Graham usysinc at hotmail.com
Thu Jun 28 22:56:30 EDT 2007


Hi group,

  I've spent days trying to get variations of the following to work, but 
though the tool is available and can be clicked on and does work, the 
Control.Panel TOOL IS INVISIBLE. Can anyone tell me how to make the tool 
visible?

var p = new OpenLayers.Control.Panel({'displayClass': 
'olControlEditingToolbar'});
p.addControls([ new OpenLayers.Control.Navigation(), new 
OpenLayers.Control.ZoomBox() ]);
map.addControl(p);

------------------------ style.css --------------------------

.olControlEditingToolbar div {
  float:right;
  width:  24px;
  height: 24px;
  margin: 5px;
}
.olControlEditingToolbar .olControlNavigationItemActive {
  background-image: url("img/pan_on.png");
  background-repeat: no-repeat;
}
.olControlEditingToolbar .olControlNavigationItemInactive {
  background-image: url("img/pan_off.png");
  background-repeat: no-repeat;
}
.olControlEditingToolbar .olControlZoomBoxItemActive {
  background-image: url("img/drag-rectangle-on.png");
  background-color: orange;
  background-repeat: no-repeat;
}
.olControlEditingToolbar .olControlZoomBoxItemInactive {
  background-image: url("img/drag-rectangle-off.png");
  background-repeat: no-repeat;
}

_________________________________________________________________
Who's that on the Red Carpet? Play & win glamorous prizes. 
http://club.live.com/red_carpet_reveal.aspx?icid=REDCARPET_hotmailtextlink3




More information about the Users mailing list