How to Expose and Use MyListing Job Li...
This MyListing code snippet exposes the otherwise private “job_listing” p...

WPCodeBox
615
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);
}
});

Check it a URL parameter exists in Oxygen Builder.




