Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I catch a click event on openlayers map and show a popup with featureinfo (if any) with position set as map.getLonLatFromPixel(new OpenLayers.Pixel(e.xy)). The user might set the map to show in fullscreen with a button, a little of JS code and some css styling:

#geomap_f, #mapbox_f {
    background: white;
    position: fixed !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 49;
}

The problem arises when the user clicks the fullscreened map. The geoserver throws org.geoserver.platform.ServiceException: 979, 8330 not in dimensions of image: 1017, 943 and e.xy object holds some really huge numbers (979, 8330 in this case). I know I need to tell the map or the geoserver (or both) that the mapsize was changed and that I want them to recalculate the relationship between xy and latlon. I've tried using some of OpenLayers.Map methods with no success so far though. How can it be done? Do I need to resize the map differently? I already call map.updateSize() after resizing, that doesn't seem to influence the coordinates.

share|improve this question
add comment

1 Answer

For future use: It seems you have to make sure that the contents of the page fit to viewport before resizing a map to fullscreen. This can be easily done with JQuery.hide()/show() methods.

share|improve this answer
add comment

Your Answer

 
discard

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.