Get OpenLayers.Control.MousePosition in Toolbar

المشرف العام

Administrator
طاقم الإدارة
I have created an OpenLayers.Control.MousePosition:

var coord = new OpenLayers.Control.MousePosition({ prefix: 'You are here: ', separator: ' | ', numDigits: 5, emptyString: 'Mouse is not over map.', displayProjection: "EPSG:4326", }); map.addControl(coord);And a Toolbar:

var toolBar = new Ext.Toolbar({ items: [ { xtype: "label", text: "Scale = 1: ", }, { xtype: 'displayfield', } ] });This Toolbar is the tbar in my mapPanel:

var mapPanel = new GeoExt.MapPanel({ region: "center", map: map, tbar:toolBar });Is there any posibillity to get the Value of the Mouse Position as a displayfield in my Toolbar?I already tried this: http://trac.geoext.org/attachment/ticket/195/195.1.patch,but my map is not working with " new GeoExt.Toolbar.ControlDisplay". Is there anything i can use instead?

I am using: OpenLayers 2, GeoExt and ExtJS.

Thank you for helping me.



أكثر...
 
أعلى