Support » Plugin: Basic Google Maps Placemarks » infoWindow pixelOffset customization

  • Resolved digitalheights

    (@digitalheights)


    Hi Ian,

    Thank you for developing this powerful and easy-to-use plugin!

    I searched to see if anyone else had inquired about the possibility of adding support for pixelOffset for the location of the infoWindow but I couldn’t find anything.

    I have a special use case where the map marker is an irregular shape and need to reposition the infoWindow slightly up and to the right.

    I was able to make the necessary change in functions.js just after line 40:

    Before

    // Initialize single info window to reuse for each placemark
    $.bgmp.infoWindow = new google.maps.InfoWindow( {
    content : '',
    maxWidth : bgmpData.options.infoWindowMaxWidth
    } );

    After

    // Initialize single info window to reuse for each placemark
    $.bgmp.infoWindow = new google.maps.InfoWindow( {
    content : '',
    maxWidth : bgmpData.options.infoWindowMaxWidth,
    pixelOffset: new google.maps.Size(22, 15)
    } );

    I read your post about The Right Way to Customize a WordPress Plugin, but I am not sure how to approach making this particular customization.

    Any pointers in advance of your possibly adding support for pixelOffset is appreciated.

    Thanks again!

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ian Dunn

    (@iandunn)

    Hi, I added support for that in r1098760. It defaults to 0, 0, but can by modified via the bgmp_map-options filter.

    It’ll be available in the next major version, but I don’t have an ETA for that, so you may want to cherry pick it in the mean time.

    Thanks Ian – Sounds good.
    Scott

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘infoWindow pixelOffset customization’ is closed to new replies.