I'm creating my own control panel outside of map and I wanna create one button
just for put some variable info text.
This is my button code:
var info = new OpenLayers.Control.Button({
type: OpenLayers.Control.TYPE_BUTTON
,trigger: function() {}
,id: "velInfoButton"
,displayClass: "olControlButtonInfo"});
var panel = new OpenLayers.Control.Panel({
div:OpenLayers.Util.getElement('cp') , displayClass:'dc' });
And then when I click another button just change innerHTML.
document.getElementById("velInfoButton").innerHTML = variable;
But my problem is the text goes to the upper left of the map div.
I tried another solutions and the "best" was define id of button after I added
the control panel. This solutions works in FF and not in IE.
var info = new OpenLayers.Control.Button({
type: OpenLayers.Control.TYPE_BUTTON
,trigger: function() {}
,displayClass: "olControlButtonInfo"});
var panel = new OpenLayers.Control.Panel({
div:OpenLayers.Util.getElement('cp') , displayClass:'dc' });
panel.addControls([my_buttons]);
info.panel_div.id = "velInfoButton";
Can somebody help me to find one solution?
Thanks a lot!
_________________________________________________________________
¡Citas! ¡Ligues! ¿Salimos? ¿Cómo es tu pareja ideal? Búscala en el sitio nº1…
¡Regístrate ya!
http://contactos.es.msn.com/?mtcmk=015352
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users