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

I am using the GeoExt example and this is the js code and trying to get rid of the multiple lat and lon that get added into the PopUp on multiple clicks.

Not sure which is the code that I need to comment out? I thought that removing,

this.handlerOptions = OpenLayers.Util.extend(
            options && options.handlerOptions || {}, 

Would do the job but it seems that is not right as I am still getting the multiple popups and commenting out that code made no difference. Not sure what that code was for?

share|improve this question
up vote 0 down vote accepted

Try to modify code of your Click control:

var control = new OpenLayers.Control.Click({
    trigger: function(evt) {
        var loc =;
        if (popup) popup.close();
share|improve this answer
thanks a lot that works beautifully. Another problem is that in the example that i have posted in the question, the popup moves along with the location, in my case it continues to be static. I think it because of the difference in the projection, but do not know how should I change the projection? – Sam007 Aug 1 '12 at 22:13
I did add location: loc.xy to the popup = new GeoExt.Popup({}) but still it made no difference. – Sam007 Aug 1 '12 at 22:16
Could you create new question and share your code or live demo link? – drnextgis Aug 1 '12 at 22:47
here is the question and the link to my app… – Sam007 Aug 2 '12 at 2:24

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.