Ok, I managed to get the js file for the MousePositionItem widget. Using this example as a guide, <a href="http://dev.geoext.org/sandbox/cmoullet/ux/Toolbar/examples/ToolbarExample.html">http://dev.geoext.org/sandbox/cmoullet/ux/Toolbar/examples/ToolbarExample.html</a>, I still have some concerns. In the example they have the mouseposition in the same place OpenLayers will put it for me. I'd really like to get the mouseposition on the bbar itself, and even better, in a text field on the bbar. I have tried several approaches and none have yet to work:<br>
<br>var mousePositionItem = new GeoExt.ux.Toolbar.MousePositionItem({<br> map: map,<br> controlOptions: {<br> numDigits: 0<br> }<br> });<br><br>bbar: [ <br>
{<br> xtype: "textfield",<br> text: mousePositionItem.getText() //This broke the code, but is there a function like this? <br> },<br>
{<br> xtype: "label",<br> text: "Scale = 1 : " <br> }<br><br> ],<br> items: [ mousePositionItem,{ //This still kept the mouseposition text on the map itself not on the bbar :(<br>
xtype: "gx_zoomslider",<br> vertical: true,<br> height: 300,<br> x: 10,<br> y: 20,<br> plugins: new GeoExt.ZoomSliderTip()<br>
}]<br><br>My other approach was putting the mousePositionItem in the bbar field <br><br>bbar: [ mousePositionItem, //was still on the map and not actually on the bbar :(<br>
{<br>
xtype: "textfield",<br>
text: mousePositionItem.getText() //This
broke the code, but is there a function like this? <br>
},<br>
{<br>
xtype: "label",<br>
text: "Scale = 1 : " <br>
}<br>
<br>
]<br><br>Thanks for all the help,<br><br>elshae<br><br><div class="gmail_quote">On Mon, Oct 4, 2010 at 11:10 AM, IT Intern <span dir="ltr"><<a href="mailto:itintern12@gmail.com">itintern12@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thank you Frederic for your reply. This may sound really funny, but I am actually struggling to use the patch. I downloaded the file and I have no idea where to put it or if I have to rename it. I've been looking through the GeoExt UX docs for a while now and am just not clear on how to use this library. Someone please help me and I am sorry if this seems so noob...<br>
<br>Thanks,<br><br>elshae<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Oct 3, 2010 at 8:50 AM, Frederic Junod <span dir="ltr"><<a href="mailto:frederic.junod@camptocamp.com" target="_blank">frederic.junod@camptocamp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello,<br>
<br>
Please look at <a href="http://trac.geoext.org/ticket/195" target="_blank">http://trac.geoext.org/ticket/195</a> (patch 195.1.patch)<br>
The patch adds a class (inherited from Ext.Toolbar.TextItem) to<br>
display the output from a OpenLayers.Control.MousePosition.<br>
<br>
fredj<br>
<div><div></div><div><br>
On Fri, Oct 1, 2010 at 6:07 PM, IT Intern <<a href="mailto:itintern12@gmail.com" target="_blank">itintern12@gmail.com</a>> wrote:<br>
> Hello GeoExt List,<br>
><br>
> I have a map in a GeoExt browser. Id like to add a ext.fom.textfield object<br>
> on my mapPanels bottom toolbar which displays the details of a Openlayers<br>
> Mouse Position object. If anyone has done anything like this, please lend<br>
> me a hand!<br>
><br>
> Much appreciated :),<br>
><br>
> elshae<br>
><br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br>
> <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Frédéric Junod<br>
Camptocamp SA<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>