Opened 13 months 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:


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:

  1. Close your browser.
  2. Open your browser in a private window (no cache/cookies/etc.)
  3. Go directly to the address search, without opening the map viewer before
  4. Search a valid address and open the resulting link to view it on the mal
  5. 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.




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)

Geoportal-Adressuche-Fehler-EPSG-Initilisierung.jpg (71.5 KB) - added by SvenLVGL 13 months ago.

Download all attachments as: .zip

Change History (1)

Note: See TracTickets for help on using tickets.