title: leaflet map, getting specific data of geojson file with button
body: <p>I'm triying to display on my map specific value ( data.geojson) of my geojson file with buttons. (for exemple to plot a map with only value "domaine":"violences   ")</p>
  
  <p>I am loocking for a way to rely my data ("domaine":"violences" or other)with a buttons on my map ?</p>
  
  <p>Thanks so much in advance for your time.
  my js:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
  var map = L.map('map');
  var terrainTiles = L.tileLayer('http://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.{ext}', {
      attribution: 'Map tiles by &lt;a href="http://stamen.com"&gt;Stamen Design&lt;/a&gt;, &lt;a href="http://creativecommons.org/licenses/by/3.0"&gt;CC BY 3.0&lt;/a&gt; &amp;mdash; Map data &amp;copy; &lt;a href="http://www.openstreetmap.org/copyright"&gt;OpenStreetMap&lt;/a&gt;',
      subdomains: 'abcd',
      minZoom: 0,
      maxZoom: 20,
      ext: 'png'
  });
  
  
  
  terrainTiles.addTo(map);
  map.setView([46.5160000, 6.6328200], 10);
  
  
  
  
  L.control.locate(location).addTo(map);
  
  function addDataToMap(data, map) {
      var dataLayer = L.geoJson(data, {
          onEachFeature: function(feature, layer) {
              var popupText = "&lt;b&gt;" + feature.properties.nom
                  + "&lt;br&gt;" 
  
                  + "&lt;small&gt;"  + feature.properties.localite 
                  + "&lt;br&gt;Rue: " + feature.properties.rue + + feature.properties.num
                  + "&lt;br&gt;Téléphone: " + feature.properties.tel
  
                  + "&lt;br&gt;&lt;a href= '" + feature.properties.url + "'&gt;Internet&lt;/a&gt;";
              layer.bindPopup(popupText); }
          });
      dataLayer.addTo(map);
  }
  
  $.getJSON("data.geojson", function(data) { addDataToMap(data, map); });
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>the data.geojson</p>
  
  <pre><code>{
  "type": "FeatureCollection",
  "features": [
  {
  "type": "Feature",
  "geometry": {
     "type": "Point",
     "coordinates":  [ 6.1200622,46.2106091 ]
  },
  "properties": {
    "nom":"Centre d'entraînement aux méthodes d'éducation active - Genève",
    "rue":"Route des Franchises",
    "num":"11",
    "npa":1203,
    "localite":"Genève",
    "canton":"GE",
    "tel":"022 940 17 57",
    "url":"www.formation-cemea.ch",
    "domaine":"formation   "
  }
    },
  
    {
  "type": "Feature",
  "geometry": {
     "type": "Point",
     "coordinates":  [ 6.1243056,46.2120426 ]
    },
  "properties": {
    "nom":"VIRES",
    "rue":"Rue Ernest-Pictet ",
    "num":"10",
    "npa":1203,
    "localite":"Genève",
    "canton":"GE",
    "tel":"022 328 44 33",
    "url":"www.vires.ch",
    "domaine":"violences   "
    }
  }
  </code></pre>