title: Get and display lat long from address using Leaflet Control Search
body: <p>I am using leaflet.js and this plugin: <a href="https://github.com/stefanocudini/leaflet-search" rel="nofollow">https://github.com/stefanocudini/leaflet-search</a> and need a way of getting the lat and long coordinates from the address search and putting them into an input field, or just being able to use them... </p>
  
  <p>The answer may well be in the code below, just can't figure out how to do it...</p>
  
  <pre><code>                var geocoder = new google.maps.Geocoder();
  
                  function googleGeocoding(text, callResponse)
                  {
                      geocoder.geocode({address: text}, callResponse);
                  }
  
                  function filterJSONCall(rawjson)
                  {
                      var json = {},
                          key, loc, disp = [];
  
                      for(var i in rawjson)
                      {
                          key = rawjson[i].formatted_address;
  
                          loc = L.latLng( rawjson[i].geometry.location.lat(), rawjson[i].geometry.location.lng() );
  
                          json[ key ]= loc;   //key,value format
                      }
  
                      return json;
                  }
  
                  map.addControl( new L.Control.Search({
                          callData: googleGeocoding,
                          filterJSON: filterJSONCall,
                          wrapper: 'findbox',
                          markerLocation: true,
                          autoType: false,
                          autoCollapse: true,
                          minLength: 5,
                          zoom: 10,
                          initial: true,
                          collapsed: false,
                          tipAutoSubmit: false,
                          autoResize: false,
                          text: 'Enter an Address'
                      }) );
  </code></pre>