IE8 shows no POI list in mashup

Home Forums MapPress Support IE8 shows no POI list in mashup

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #11638
    thedudem4n
    Participant

    Version:2.39.9
    The map shows with all the points but the poi_list is not being displayed at all in the mashups (when i view the items individually it’s fine but the mashup is totally gone.

    It prints the <div id=mapp0_poi_list class=”mapp-poi-list” style=”width:100%”> and then nothing under it, the ul list is never printed. It works for IE9/firefox/chrome/safari though just not working in IE8

    #11639
    Chris
    Keymaster

    Hi,

    Can you provide a URL illustrating the problem?

    #11640
    thedudem4n
    Participant

    Bleh, it’s private. However I found the cause. I have javascript in map_poi_list.php (sorry forgot I appended it). It works on all browsers but IE8.

    however removing the code and leaving the <script> tag still breaks it. Just having <script type=”text/javascript”></script> in there is breaking the IE8 list… any possible solution to this? I can just do feature jquery detection to hide the script from IE, but if the script is removed and it still doesn’t work not sure what to do.

    #11641
    Chris
    Keymaster

    Hi,

    Maybe you could just output your script in the footer, rather than the poi list?

    The list is actually generated and then moved to its container <div> when the map is displayed, so your script tag is ending up inside a <div> – something I guess IE8 doesn’t like.

    There’s also an action that gets called when a map is displayed: mappress_map_display($map).  It gets passed the entire map in ($map).  You might be able to output your script tags there as well.

    #11642
    thedudem4n
    Participant

    The reason I put it in map_poi_list was because I was unable to get the script to fire anywhere else, inline in the footer, in external js files, anywhere. once the map list is built I can’t manipulate any of it externally…

     

    <script type=”text/javascript”>

    $( “.mapLinks li” ).each(function(index) {

    $(‘.lazyLoad’).hide();

    if (index >= 20) {

    $(this).hide();

    $(‘.lazyLoad’).show();

    }

    });

    </script>

    I just want to hide the rest of the list since we have like 200 items and then put a button on the bottom to show the rest.

    #11650
    thedudem4n
    Participant

    There’s also an action that gets called when a map is displayed: mappress_map_display($map).  It gets passed the entire map in ($map).  You might be able to output your script tags there as well.

    How do I access that exactly? (not entirely understanding that bit would love to try it)

    #11653
    Chris
    Keymaster

    Hi, there are ‘filters’ and ‘actions’ all over in WordPress (and in MapPress).  You can use them to perform your own processing:

    http://codex.wordpress.org/Function_Reference/add_action

    In this case:

    add_action(‘mappress_map_display’, myfunction)

    Where ‘myfunction’ is your own function.

    #11658
    thedudem4n
    Participant

    ahh. Totally forgot about appending functions.php, So I set up something simple but it’s getting an Ajax error any idea why?

    add_action(‘mappress_map_display’, ‘hide_some_maps’);

    function hide_some_maps() {
    ?>

     <script type=”text/javascript”>

        ( function( $ ){

            alert(‘test’);

        } )( jQuery )

        </script>

        <?php

    #11660
    thedudem4n
    Participant

    There was literally an extra DIV tag closing and it broke everything in IE8. all is good!!

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