Map not displaying
-
Hey there!
A map we had on the front page isn’t loading when I have the JS optimized. I have excluded the js files below and combinations with the other JS optimize buttons in that box. I even talked with our host (WP Engine) and they can’t seem to find the issue. It pulls up a 404 error even though the files are there.
Live site with JS Opt disabled:
PremierDisability.comDev site with JS Opt enabled:
https://pdsreview.wpengine.com/Exclude scripts from Autoptimize:
jquery.vmap.usa.js, jquery.vmap.js, jquery.vmap.min.js, jquery.vmap.packed.js, jqvmap.cssAnd if it helps this is the line of code on our page-home.php that’s adding that section in.
<script type="text/javascript"> jQuery(document).ready(function() { var links = { <?php if($children){ foreach($children as $child){ echo strtolower(get_field('state_short_code',$child->ID)) . ":'".get_permalink($child->ID)."',"; } } ?> }; jQuery('#vmap').vectorMap({ map: 'usa_en', borderColor: '#ffffff', color: '#cfcfcf', backgroundColor: '#ffffff', borderWidth: 3, enableZoom: true, showTooltip: true, hoverColor: false, onRegionClick: function(event, code, region){ event.preventDefault(); window.location =links[code]; } }); }); </script> <!--<![endif]-->
The page I need help with: [log in to see the link]
- The topic ‘Map not displaying’ is closed to new replies.