Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <select name="shot-result" class="custom-select" id="shotresult">
  2. option value="all">All Shots</option>
  3. option value="Made">Made</option>
  4. option value="Missed">Missed</
  5. </select>
  6.  
  7. {
  8. "type": "Feature",
  9. "properties": {
  10. "ID": 2,
  11. "SEASON_SHO": "1998-1999",
  12. "GAME_TYPE": "Regular",
  13. "PERIOD": 1,
  14. "MINUTES_RE": "06:25:00",
  15. "ACTION_TYP": "Jump Shot",
  16. "SHOT_TYPE": "2-PT-Wurf",
  17. "SHOT_DISTA": 15,
  18. "GAME_DATE": "05.02.1999",
  19. "HEIM": "SEA",
  20. "GAST": "DAL",
  21. "GEGNER": "Seattle SuperSonics",
  22. "SHOT_ATTEM": 1,
  23. "SHOT_MADE_": 0
  24. },
  25. "geometry": {
  26. "type": "Point",
  27. "coordinates": [
  28. -0.314959,
  29. -0.159125
  30. ]
  31. }
  32. }
  33.  
  34. var url = 'data/Wuerfe.geojson';
  35. var allewuerfe;
  36.  
  37. allewuerfe = L.geoJson(null, {
  38.  
  39. onEachFeature: onEachFeature,
  40. style: style,
  41. pointToLayer: function (feature, latlng) {
  42. return L.circleMarker(latlng, allewuerfe);
  43. }
  44. });
  45.  
  46. $.getJSON(url, function (data) {
  47. allewuerfe.addData(data);
  48. });
  49.  
  50. var data = L.layerGroup([
  51. ]);
  52. data.addLayer(allewuerfe);
  53. data.addTo(map);
  54.  
  55. <button class="btn reset-btn" id="all">Reset</button>
  56.  
  57. document.getElementById("all").addEventListener('click', function (event) {
  58. data.clearLayers();
  59. data.addLayer(allewuerfe);
  60. data.addTo(map);
  61. });
  62.  
  63. <select name="shot-result" class="custom-select" id="shotresult">
  64. <option value="all">Alle Würfe</option>
  65. <option value="Made">Getroffen</option>
  66. <option value="Missed">Verworfen</option>
  67. </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement