Support » Plugin: Basic Google Maps Placemarks » customize style of InfoWindow

  • Hi,

    I’ve been able to tweak your code which enables me to change the style of the InfoWindow, here is an example:

    http://asvanykincs.hu/map/

    Basically, the functions.js has been changed with this code:

    openInfoWindow : function( map, marker, infoWindowContent )
    {
    $.bgmp.infoWindow.setContent( infoWindowContent );
    $.bgmp.infoWindow.open( map, marker );

    // TWEAKING THE INFOWINDOW STYLE

    // Reference to the DIV that wraps the bottom of infowindow
    var iwOuter = $(‘.gm-style-iw’);

    /* Since this div is in a position prior to .gm-div style-iw.
    * We use jQuery and create a iwBackground variable,
    * and took advantage of the existing reference .gm-style-iw for the previous div with .prev().
    */
    var iwBackground = iwOuter.prev();

    // Removes background shadow DIV
    iwBackground.children(‘:nth-child(2)’).css({‘display’ : ‘none’});

    // Removes white background DIV
    iwBackground.children(‘:nth-child(4)’).css({‘display’ : ‘none’});

    Probelem is that when scroll(zoom) action happens the tweaked options are lost and the original rules are coming back; if click happens again the new code fires. What could we do to overcome the problem?

    Thanks,
    Dave

    https://wordpress.org/plugins/basic-google-maps-placemarks/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘customize style of InfoWindow’ is closed to new replies.