Skip to content

Commit 7c8b422

Browse files
committed
use existing geocode
1 parent 08d3c7f commit 7c8b422

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

locationpicker.jquery.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@
195195
var address = $(inputBinding.locationNameInput).val();
196196
if (address.length > 5 && blur) {
197197
blur = false;
198-
var geocoder = new google.maps.Geocoder();
199-
geocoder.geocode({'address': address}, function(results, status) {
198+
gmapContext.geodecoder.geocode({'address': address}, function(results, status) {
200199
if(status == google.maps.GeocoderStatus.OK) {
201200
GmUtility.setPosition(gmapContext, results[0].geometry.location, function(context) {
202201
updateInputValues(inputBinding, context);

0 commit comments

Comments
 (0)