I am using org.geotools.swing.JMapPane within a custom JDialog class that is modeled after the org.geotools.swing.JMapFrame class.
I am observing that the JMapPane does not paint its layers (no map or other features are visible and all we see is a blank area) the first time the dialog is displayed. Then if I do any of the following the JMapPane displays its layers:
- Click the Display Full Extent icon
- Zoom or pan the MapPane using the corresponding tools in toolbar
- Toggle layer visibility
- Dismiss dialog (using OK, button Cancel button or close control on titlebar) and show it again
I realize that I have extended the original code and could have broken something in the process.
But I was wondering if anyone familiar with the code can suggest what the cause might be. Any debugging tips would be terrific.
On a related note, what is the recommended way to trigger a refresh on the JMapPane after I dynamically add layers (with FeatureCollection) to the MapContent .
Thanks very much.
-- Regards, Farrukh Najmi Web: http://www.wellfleetsoftware.com