How to Disable REST API Access for Gue...
Learn how to disable the REST API in your WordPress site for logged-out users and bui...

WPCodeBox
712
Control how maps are displayed on your MyListing website with this code snippet. Easily set the default map zoom to the middle of the United States or customize the coordinates to any location of your choice. This MyListing map snippet provides greater control over your website’s map presentation.
/**
* Author: MyListing Club
* Author URI: https://mylisting.club
*/
jQuery(document).ready(function ($) {
if ($(".location-field-wrapper .c27-map").length) {
var mapZoom = setInterval(function () {
if (MyListing.Maps.instances.length) {
MyListing.Maps.instances.forEach((instance) => {
instance.map.setCenter(["-97.922211", "39.381266"]); // starting position [long, lat]
instance.map.setZoom(03);
});
clearInterval(mapZoom);
}
}, 500);
}
});





