Skip to content

Commit ef44181

Browse files
committed
Forgot to remove one of the UTF-8 encoding lines in the Geocoder function.
1 parent 7b38025 commit ef44181

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

js/geocode.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//Geocode function for the origin location
2-
geocoder = new google.maps.Geocoder();
32
function GoogleGeocode() {
3+
geocoder = new google.maps.Geocoder();
44
this.geocode = function(address, callbackFunction) {
55
geocoder.geocode( { 'address': address}, function(results, status) {
66
if (status == google.maps.GeocoderStatus.OK) {
@@ -13,7 +13,6 @@ function GoogleGeocode() {
1313
callbackFunction(null);
1414
}
1515
});
16-
1716
};
1817
}
1918

js/jquery.storelocator.js

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* storeLocator v1.3.2 - jQuery store locator plugin
2+
* storeLocator v1.3.3 - jQuery store locator plugin
33
* (c) Copyright 2012, Bjorn Holine (http://www.bjornblog.com)
44
* Released under the MIT license
55
* Distance calculation function by Chris Pietschmann: http://pietschsoft.com/post/2008/02/01/Calculate-Distance-Between-Geocodes-in-C-and-JavaScript.aspx
@@ -66,23 +66,21 @@ $.fn.storeLocator = function(options) {
6666

6767
//Geocode function for the origin location
6868
function GoogleGeocode() {
69-
geocoder = new google.maps.Geocoder();
70-
this.geocode = function(address, callbackFunction) {
71-
address = unescape(encodeURIComponent(address));
72-
geocoder.geocode( { 'address': address}, function(results, status) {
73-
if (status == google.maps.GeocoderStatus.OK) {
74-
var result = {};
75-
result.latitude = results[0].geometry.location.lat();
76-
result.longitude = results[0].geometry.location.lng();
77-
callbackFunction(result);
78-
} else {
79-
alert("Geocode was not successful for the following reason: " + status);
80-
callbackFunction(null);
81-
}
82-
});
83-
84-
};
85-
}
69+
geocoder = new google.maps.Geocoder();
70+
this.geocode = function(address, callbackFunction) {
71+
geocoder.geocode( { 'address': address}, function(results, status) {
72+
if (status == google.maps.GeocoderStatus.OK) {
73+
var result = {};
74+
result.latitude = results[0].geometry.location.lat();
75+
result.longitude = results[0].geometry.location.lng();
76+
callbackFunction(result);
77+
} else {
78+
alert("Geocode was not successful for the following reason: " + status);
79+
callbackFunction(null);
80+
}
81+
});
82+
};
83+
}
8684

8785
//Reverse geocode to get address for automatic options needed for directions link
8886
function ReverseGoogleGeocode()

js/jquery.storelocator.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ A note on the distance calculation: this plugin currently uses a distance functi
88

99
## Changelog
1010

11+
### Version 1.3.3
12+
13+
Forgot to remove one of the UTF-8 encoding lines in the Geocoder function.
14+
1115
### Version 1.3.2
1216

1317
Only a few special characters were working with the previous fix. Removed special encoding and all seem to be working now.

0 commit comments

Comments
 (0)