Reply To: Map Ready

Home Forums MapPress Support Map Ready Reply To: Map Ready

#13955
Chris
Keymaster

Hi,

If you check the page HTML, is the map object named mapp0? That’s the default name for the first map on the screen (you can also control it in the shortcode with name=”myname”).

You can also see on the page source if the map is being loaded after document ready. If so, try using that jQuery event:

jQuery(document).ready(function() {
  ..code...
});

If you queue your ‘ready’ event in the footer of the page, it should execute after the one queued to create the map object.

If the above don’t help then you may want to look at modifying mappress.php where the map is output to include your ready event there. If you take that approach let me know and I’ll try to include an action or filter hook there for future development so you don’t need to keep applying the modification.