No maps showing since update to 2.84.14

Home Forums MapPress Support No maps showing since update to 2.84.14

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19795
    transfer
    Participant

      Hi,

      I updated mappress from 2.83.18 to 2.84.14 and also WordPress to Version 6.1. And now I realize that the maps are not showing anymore, instead there is a white square, but with the google maps hamburger menu button.

      I deactivated all other plugins and my custom map css. I de- and reinstalled, checked the previous version again.
      Nothing helped.

      I use custom PHP to generate the map from serialized POIs that worked fine and still works similar on other websites (with the older version and previous WP-version):

      $mymap = new Mappress_Map(array(
         'width' => '100%',
         'height' => '700px',
         'poiList' => true
      ));
      $pois = array();
      ?>
      <?php while ( have_posts() ) : the_post(); ?>
         <?php
         $counter = array('_1', '_2', '_3','_4','_5');   // this is just to load up to 5 POIs per custom post 
         $prfx = '';
         foreach ($counter as $cnt) {
            $prfx = 'cstnfo_spot' . $cnt;
            $poistring = get_post_meta(get_the_ID(), $prfx.'_poi', true);
            if ('' != $poistring) {
               $attrs = unserialize($poistring, [Mappress_Poi::class]);
               $mypoi = new Mappress_Poi($attrs);
               if (poi_is_in_borders($mypoi)) {
                  $pois[] = $mypoi;
               }
            }
         }
         ?>
      <?php endwhile; ?>
      <?php
      $mymap->pois = $pois;
      echo $mymap->display();
      ?>

      I checked the DB entries, data is still there, the Mappress Map object shows POIs on inspection. I inspected the code given by $mymap->display, it shows the the POIs in the JS part.

      Please help, I can’t figure out, why the maps are blank.

      Kind regards
      Dirk Rathjens for transfer

       

       

      #19799
      transfer
      Participant

        I forgot to mention: there are no errors reported, not in PHP on the server neither in JS in the browser.

        #19800
        Chris
        Keymaster

          Hi,

          Can you provide a URL so I can see the (missing) map in question?

          Also, a login would be helpful so I can trace the custom code.  You can use the contact form to send it to me directly.

          #19801
          Chris
          Keymaster

            Hi,

            I replied to your email, but in case you’re checking here, there’s some CSS that is causing the map to have zero height.  I think it’s because it applies to all divs in the content area (style.scss:233) :

            #content div {

            position: relative;

            }

            You could either change that rule or override it for just the map divs.

            #19803
            transfer
            Participant

              I removed the rule and now the maps are showing up. So my problem is solved. Thanks

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.