Opened 5 years ago
#920 new defect
failed initialization of EPSG from address search
Reported by: | SvenLVGL | Owned by: | dev |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | core | Version: | 2.7.3 |
Keywords: | Cc: |
Description
Describe the bug
The map viewer throws error messages and does not work as intended when opened directly from the address search if it was not initialized before.
To Reproduce
Steps to reproduce the behavior:
- Close your browser.
- Open your browser in a private window (no cache/cookies/etc.)
- Go directly to the address search, without opening the map viewer before
- Search a valid address and open the resulting link to view it on the mal
- See error similar to the attached screenshots.
Expected behavior
The map viewer should zoom to the addresses location on the map and display a dot to indicate the location.
Screenshots
...
Desktop
Has been tested with
- Google Chrome
- Mozilla Firefox
- Microsoft Internet Explorer
- Microsoft Edge
Additional context
The fix seems to be found already. The issue is in the file mapbender/http/javascripts/initWmcObj.php.
The following line seems to produce the problem, if the epsg has not been initialized in this session before.
$currentEpsg = Mapbender::session()->get("epsg");
The solution could look like this:
$currentEpsg = Mapbender::session()->get("epsg"); if (!$currentEpsg) { $currentEpsg = $DEFAULT_EPSG; }
With DEFAULT_EPSG
being defined in a configuration file that's included.
Attachments (1)
Change History (1)
by , 5 years ago
Attachment: | Geoportal-Adressuche-Fehler-EPSG-Initilisierung.jpg added |
---|