+ // make text the same in both text boxes
+ var value = e.target.value;
+ endpoint.setValue(value)
+ });
+
+ endpoint.setValue = function(value) {
+ endpoint.value = value;
+ delete endpoint.latlng;
+ input.val(value);
+ endpoint.getGeocode();
+ }
+
+ endpoint.getGeocode = function() {
+ // if no one has entered a value yet, then we can't geocode, so don't
+ // even try.
+ if (!endpoint.value) {
+ return;
+ }
+