Skip to content

Instantly share code, notes, and snippets.

@kaskad88
Last active December 8, 2023 16:40
Show Gist options
  • Save kaskad88/a5f26a0fc6079b5c194203431c4b5303 to your computer and use it in GitHub Desktop.
Save kaskad88/a5f26a0fc6079b5c194203431c4b5303 to your computer and use it in GitHub Desktop.
window.addEventListener( 'DOMContentLoaded', function() {
var $map = $( '.jet-map-listing' );
if ( ! $map.length ) {
return;
}
$map.on( 'jet-filter-custom-content-render', function( event, response ) {
if ( ! response.markers.length ) {
var mapInstance = $( event.target ).data( 'mapInstance' );
// Using the mapInstance can now use methods from the map api
// Ex: https://developers.google.com/earth-engine/apidocs/map-setzoom
mapInstance.setZoom( 5 );
}
} );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment