Last active
December 8, 2023 16:40
-
-
Save kaskad88/a5f26a0fc6079b5c194203431c4b5303 to your computer and use it in GitHub Desktop.
This file contains 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
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