title: Leaflet setView by ajax (cityname or postalCode)
body: <p>We are trying to switch to Leaflet from gmaps.
  SEtting up the map worked fine, markers for all our stores work, too.
  I used leaflet-search for this build-in solution for searching for cities.</p>
  
  <p>But it is working on keyPress or sth like that.</p>
  
  <p>We want to have an input with a separate button for submitting.</p>
  
  <p>Earlier, we just used an ajax, with a certain url from gmaps, and appended the searchvalue.
  But with Leaflet I just cannot make it ...
  It looked like this:</p>
  
  <pre><code>function geocode(key)
  {
  var address = key.replace(/ /g, '+');
  var url = 'https://maps.googleapis.com/maps/api/geocode/json';
  url += "?key=" + SitePreferences.GOOGLE_MAP_API_KEY;
  
  $.ajax({
      url     : url,
      data    : {address:address},
      dataType: "json",
      success : function (json)
      {
          setGeocode(json);
      },
      error: function()
      {
          console.log("Google map API geocode error");
      }
  });}
  </code></pre>
  
  <p>How do I do that with leaflet ?
  I tried sth like that without success though:</p>
  
  <pre><code>var url = 'https://nominatim.openstreetmap.org/search?format=json&amp;q={address}';
  
          $.ajax(
          {
               url:url, 
               dataType: "json",
               success: function(data)
               {
                   console.log(data),
               }
          });
  </code></pre>