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
| /** | |
| * Custom script which handles loading remote images via Google Photos API | |
| * | |
| * Import your image photo references accordingly | |
| */ | |
| jQuery(function($){ | |
| WPGMZA.ProInfoWindow.prototype.open = function(map, feature) | |
| { | |
| var self = this; | |
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
| /** | |
| * Overrides the scroll functionality on marker listings | |
| */ | |
| jQuery(function($){ | |
| WPGMZA.MarkerListing.prototype.onItemClick = function(event) { | |
| var marker_id = $(event.currentTarget).attr("mid"); | |
| var marker = this.map.getMarkerByID(marker_id); | |
| var listingPushedInMap = WPGMZA.maps[0].settings.push_in_map && WPGMZA.maps[0].settings.push_in_map.length; | |
| var clickedGetDirections = $(event.target).hasClass("wpgmza_gd"); |
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 this 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
| <?php | |
| /** | |
| * 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 | |
| */ |
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
| /** | |
| * This snippet acts as a small example of how you might access a map and: | |
| * - Change center point | |
| * - Change zoom level | |
| * - Access a marker by it's ID | |
| * - Create a custom Lat/Lng object | |
| */ | |
| jQuery(function($){ | |
| // Do not run if WPGMZA global is not available |
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; | |
| } |