Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The title says it all. I'm using GeoExt as part of OpenGeo Suite. I would like to display the current mouse coordinates.

Update: I was getting confused as to what parts of the code are GeoExt and which parts are OpenLayers.

Here's some code. mapPanel is a GeoExt object. is an OpenLayers object.

var mapPanel = new GeoExt.MapPanel({ 
    // etc.
}); OpenLayers.Control.MousePosition());
share|improve this question
Have similar problem but I don quite Have similar problem but I don´t quite get the provided answer ... I´m building a OpenGeo app using suite SDK and so far I haven´t been able to find a way to add the Mouse Position to my code. The code I´m using does not have a GeoExt.MapPanel, instead I have var app = new gxp.Viewer({ portalConfig: {}, tools:[], //etc }); to be honest I have no idea where or how I add the openLayer.Control into these code so any idea woulb be much apreciated – gallysam Jan 13 '14 at 19:10
up vote 6 down vote accepted

As GeoExt is using OpenLayers for the map interface, you could use its MousePosition contol :

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.