This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function(){ | |
jQuery(window).load(function(){ | |
WPGMZA.MarkerClusterer.prototype.redraw = function() { | |
WPGMZA.MarkerClusterer.log("redraw called", this); | |
this.map.clusterSepBridge = true; | |
if(typeof this.shouldRegenNVC === 'undefined'){ | |
this.shouldRegenNVC = true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($){ | |
let bouncingMark = false; | |
$(document.body).on('mouseenter', '.wpgmaps_mlist_row', function(){ | |
const map = WPGMZA.maps[0]; | |
const markerId = $(this).attr('mid'); | |
if(markerId){ | |
if(bouncingMark !== markerId){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The following script allows custom field to be used as part of get variable filtering | |
* | |
* Create a custom field called 'id', set it to visible in info-window, and ensure your marker has the relevant field filled with a number | |
* | |
* Once done, add thos script and append your variable as ?custom_id=1 | |
*/ | |
jQuery(function($){ | |
$(document.body).on('markersplaced.wpgmza', function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is an example of how you might manipulate a marker with WP Google Maps programattically | |
* | |
* The following code should be added to your theme's functions.php file | |
* | |
* Note: This is not conditional, meaning additional checks would need to be put in place for manipulation when a form is submitted for example | |
*/ | |
/** | |
* Example of editing a marker title |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is an example of how you might add a marker to WP Google Maps programattically | |
* | |
* The following code should be added to your theme's functions.php file | |
* | |
* Note: This is not conditional, meaning a marker would be created each time the admin area initializes, | |
* you could easily change this to be conditional, or based on when a post is added to the map for example | |
*/ | |
function custom_wpgmza_create_marker(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* WP Google Maps makes use of the Google Maps API for map serving. | |
* | |
* The Google Maps API uses the Roboto webfont for some interface text within the map display | |
* | |
* The following script will hook into the insertBefore method and block Roboto from loading | |
* | |
* All credit to "coma" from this thread: https://stackoverflow.com/questions/25523806/google-maps-v3-prevent-api-from-loading-roboto-font | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media (max-width: 420px) { | |
.site-description { | |
display: none; | |
} | |
} | |
@media (max-width: 979px) { | |
.site-title { | |
display: none; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function(){ | |
jQuery(document.body).on("infowindowopen.wpgmza", function(e){ | |
jQuery(".wpgmza-infowindow p").each(function(){ | |
var customFieldTitle = jQuery(this).data("custom-field-name"); | |
if(customFieldTitle){ | |
jQuery(this).html("" + customFieldTitle + ": " + jQuery(this).text()); | |
} | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($){ | |
var lastMarkerId = false; | |
var scaleMultiplier = 1.3; | |
$(document.body).on('infowindowopen.wpgmza', function(e){ | |
var tmarkid = e.target.mapObject.id; | |
var tmapid = e.target.mapObject.map_id; | |
if(lastMarkerId !== tmarkid){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wpgmza_special_listing { | |
text-align: center; | |
width: 60%; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
.wpgmza_special_listing .wpgmza_special_col{ | |
width: 50%; |