title: How to add GeoJSON points as a vector tile in Leaflet?
body: <p>I've read through every question on Stack Overflow I can find and every example I can find on the web for adding GeoJSON vector tiles to a leaflet map. Unfortunately I still can't manage to wrap my head around it, much less get it work on my data.  </p>
  
  <p>I have a GeoJSON (<a href="https://raw.githubusercontent.com/evantdailey/map_testing/master/site1.geo.json" rel="nofollow noreferrer">here</a>) with many points. I can add it just fine as a layer in Leaflet, so I feel confident that it's a valid file with real values.  </p>
  
  <p>I've tried <a href="https://github.com/mapbox/geojson-vt" rel="nofollow noreferrer">geojson-vt</a> and <a href="https://github.com/Leaflet/Leaflet.VectorGrid" rel="nofollow noreferrer">leaflet vector grid</a>. </p>
  
  <p>geojson-vt keeps returning an error:<br>
  <code>Uncaught ReferenceError: z is not defined at &lt;anonymous&gt;:1:30</code><br>
  with this code:  </p>
  
  <pre><code>geoJson = {data}
  var tileOptions = {
      maxZoom: 18, 
      tolerance: 5, 
      extent: 4096,
      buffer: 64, 
      debug: 0, 
      indexMaxZoom: 0, 
      indexMaxPoints: 100000, 
  };
  var tileIndex = geojsonvt(geoJson, tileOptions);
  var tile = tileIndex.getTile(z, x, y);
  </code></pre>
  
  <p>I'm having a lot of trouble diagnosing this because none of the examples I've found have shown their data, but also none have referenced defining z, x, and y, and those aren't required values for a GeoJSON object. What am I missing?</p>
  
  <p>From <a href="https://stackoverflow.com/questions/44556267/leaflet-vectorgrid-slicer-error">another question of mine</a> I learned that Leaflet vector grid has an error with GeoJSON points. I managed to change some of the source code to resolve the initial error, but now get over 1,000 errors like:<br>
  <code>Error: &lt;path&gt; attribute d: Expected number, "MNaN,47.5aundefin…".</code>  </p>
  
  <p>from the code:<br>
  <code>L.vectorGrid.slicer(geoJson).addTo(map)</code>  </p>
  
  <p><strong>How can I add GeoJSON points as a vector tile layer to a leaflet map?</strong> Does anyone have any simple examples with data as a reference? Any help or other directions to investigate would be appreciated.</p>