Home › Forums › MapPress Support › No maps showing since update to 2.84.14
Tagged: update blank
- This topic has 4 replies, 2 voices, and was last updated 10 months, 1 week ago by
transfer.
-
AuthorPosts
-
November 16, 2022 at 6:06 am #19795
transfer
ParticipantHi,
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 transferNovember 16, 2022 at 7:03 am #19799transfer
ParticipantI forgot to mention: there are no errors reported, not in PHP on the server neither in JS in the browser.
November 16, 2022 at 9:02 am #19800Chris
KeymasterHi,
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.
November 16, 2022 at 12:05 pm #19801Chris
KeymasterHi,
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.
November 17, 2022 at 10:22 am #19803transfer
ParticipantI removed the rule and now the maps are showing up. So my problem is solved. Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.