AnsweredAssumed Answered

How to refresh map coordinates if browser window adds scrollbars?

Question asked by ChrisDunlop on Feb 12, 2015
Latest reply on Feb 12, 2015 by oearley

Hello.  I'm working on a simple app that lets the user click on the map to select a polygon and then the attribute information is presented in a results area.  My map is  on the right hand side of the screen (position = fixed).  The results panel is on the left hand side.

 

When the attribute results get populated, they sometimes extend beyond the screen bottom.  When this happens, the browser window creates a vertical scrollbar, and I can scroll down and see all the attributes (the map stays fixed on the right hand side of the screen).

 

The problem is, the map isn't aware of the addition of the scrollbar, or if I've scrolled down.  If I then click another point on the map, the coordinates are offset by the scrollbar width, and by the amount I've scrolled down.  So the wrong polygon gets selected.

 

I'm sure others have run into this.  Is there are easy way to fix this?

 

Thanks,

 

Chris

Outcomes