From 3f3612dc07196832a834a6bf3fe6919df5f27c99 Mon Sep 17 00:00:00 2001 From: Sabuj Kundu Date: Tue, 17 Apr 2018 17:04:21 +0600 Subject: [PATCH] New Feature: on zoom change event added on zoom change new event "onzoomed" can be binded now --- src/locationpicker.jquery.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locationpicker.jquery.js b/src/locationpicker.jquery.js index 9c613ae..be5d05f 100644 --- a/src/locationpicker.jquery.js +++ b/src/locationpicker.jquery.js @@ -423,6 +423,11 @@ google.maps.event.addListener(gmapContext.marker, "dragend", function(event) { displayMarkerWithSelectedArea(); }); + + gmapContext.map.addListener("zoom_changed", function(event) { + gmapContext.settings.onzoomed.apply(gmapContext.domContainer, [gmapContext.map.getZoom()]); + }); + GmUtility.setPosition(gmapContext, new google.maps.LatLng(settings.location.latitude, settings.location.longitude), function(context){ updateInputValues(settings.inputBinding, gmapContext); // Set input bindings if needed @@ -453,6 +458,7 @@ enableReverseGeocode: true, draggable: true, onchanged: function(currentLocation, radius, isMarkerDropped) {}, + onzoomed: function(currentZoom) {}, onlocationnotfound: function(locationName) {}, oninitialized: function (component) {}, // must be undefined to use the default gMaps marker