[Mapbender] #920: failed initialization of EPSG from address search

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mapbender] #920: failed initialization of EPSG from address search

mapbender-dev mailing list
#920: failed initialization of EPSG from address search
----------------------+-------------------
 Reporter:  SvenLVGL  |      Owner:  dev
     Type:  defect    |     Status:  new
 Priority:  minor     |  Milestone:
Component:  core      |    Version:  2.7.3
 Keywords:            |
----------------------+-------------------
 == 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.

 == 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.

 {{{#!php
 $currentEpsg = Mapbender::session()->get("epsg");
 }}}

 The solution could look like this:

 {{{#!php
 $currentEpsg = Mapbender::session()->get("epsg");
         if (!$currentEpsg) {
             $currentEpsg = $DEFAULT_EPSG;
         }
 }}}

 With `DEFAULT_EPSG` being defined in a configuration file that's included.

--
Ticket URL: <https://trac.osgeo.org/mapbender/ticket/920>
Mapbender <http://www.mapbender.org/>
Mapbender

_______________________________________________
Mapbender_dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapbender_dev
Reply | Threaded
Open this post in threaded view
|

Re: [Mapbender] #920: failed initialization of EPSG from address search

mapbender-dev mailing list
#920: failed initialization of EPSG from address search
-----------------------+-------------------
  Reporter:  SvenLVGL  |      Owner:  dev
      Type:  defect    |     Status:  new
  Priority:  minor     |  Milestone:
 Component:  core      |    Version:  2.7.3
Resolution:            |   Keywords:
-----------------------+-------------------
Changes (by SvenLVGL):

 * Attachment "Geoportal-Adressuche-Fehler-EPSG-Initilisierung.jpg" added.


--
Ticket URL: <https://trac.osgeo.org/mapbender/ticket/920>
Mapbender <http://www.mapbender.org/>
Mapbender

_______________________________________________
Mapbender_dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapbender_dev