Check the config.xml, and coment the line          <selected>true</selected>
which is the widget <Zoom In>. I hope this solution works well in your
application.


César

2007/7/3, Eva Martínez <[EMAIL PROTECTED]>:


Hi everyone,
I've got a great problem, if I click on the new button I put on, the zoom
still active. I don't know what to do for zoom became inactive when the
new
button is active.
Here I write what I did to create the new button.
In config.xml add in widgets "InsertarPunto":
<widgets>
<InsertarPunto id="insertarPunto">
<buttonBar>mainButtonBar</buttonBar>
<targetModel>mainMap</targetModel>
<mouseHandler>mainAoi</mouseHandler>
<class>RadioButton</class>
</InsertarPunto>

Then I create lib\widget\InsertarPunto.js:
mapbuilder.loadScript(baseDir+"/widget/ButtonBase.js");
function InsertarPunto(widgetNode,model){
ButtonBase.apply(this,new Array(widgetNode,model));
this.doAction=function(objRef,targetNode){
if(objRef.enabled){
point=objRef.mouseHandler.model.extent.getXY(targetNode.evpl);
window.open("insertarModuloMedida.jsp?x="+ point[0] + "&y=" +
point[1],"zoom","toolbar=0,resizable =1, menubar=0, status=0, location=0,
width=600, height=360"); }

}
this.setMouseListener=function(objRef){
if(objRef.mouseHandler){
objRef.mouseHandler.model.addListener('mouseup',objRef.doAction,objRef); }
}
this.model.addListener("loadModel",this.setMouseListener,this);
}

The InsertarPunto's action work well, but also do the zoom.
Can anyone help me? What do I have to do?
Thank you!!
--
View this message in context:
http://www.nabble.com/ZoomIn-still-active-while-new-button-is-selected-tf4017327.html#a11409239
Sent from the MapBuilder Devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

Reply via email to