title: How to locate user with leaflet locate?
body: <p>I'm trying to locate a user and set the map to this position with leaflet:</p>
  
  <pre><code>    &lt;script&gt;
      var map;
  
      function initMap(){
          map = new L.Map('map',{zoomControl : false});
          var osmUrl = 'http://{s}.tile.openstreetmap.org/mapnik_tiles/{z}/{x}/{y}.png',
              osmAttribution = 'Map data &amp;copy; 2012 OpenStreetMap contributors',
              osm = new L.TileLayer(osmUrl, {maxZoom: 18, attribution: osmAttribution});
          map.setView(new L.LatLng(51.930156,7.189230), 7).addLayer(osm);
      }
  
      function locateUser(){
          map.locate({setView : true});
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>On execute the browser ask for permission, but then nothing happens? What's wrong with my code?</p>