Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select name="shot-result" class="custom-select" id="shotresult">
- option value="all">All Shots</option>
- option value="Made">Made</option>
- option value="Missed">Missed</
- </select>
- {
- "type": "Feature",
- "properties": {
- "ID": 2,
- "SEASON_SHO": "1998-1999",
- "GAME_TYPE": "Regular",
- "PERIOD": 1,
- "MINUTES_RE": "06:25:00",
- "ACTION_TYP": "Jump Shot",
- "SHOT_TYPE": "2-PT-Wurf",
- "SHOT_DISTA": 15,
- "GAME_DATE": "05.02.1999",
- "HEIM": "SEA",
- "GAST": "DAL",
- "GEGNER": "Seattle SuperSonics",
- "SHOT_ATTEM": 1,
- "SHOT_MADE_": 0
- },
- "geometry": {
- "type": "Point",
- "coordinates": [
- -0.314959,
- -0.159125
- ]
- }
- }
- var url = 'data/Wuerfe.geojson';
- var allewuerfe;
- allewuerfe = L.geoJson(null, {
- onEachFeature: onEachFeature,
- style: style,
- pointToLayer: function (feature, latlng) {
- return L.circleMarker(latlng, allewuerfe);
- }
- });
- $.getJSON(url, function (data) {
- allewuerfe.addData(data);
- });
- var data = L.layerGroup([
- ]);
- data.addLayer(allewuerfe);
- data.addTo(map);
- <button class="btn reset-btn" id="all">Reset</button>
- document.getElementById("all").addEventListener('click', function (event) {
- data.clearLayers();
- data.addLayer(allewuerfe);
- data.addTo(map);
- });
- <select name="shot-result" class="custom-select" id="shotresult">
- <option value="all">Alle Würfe</option>
- <option value="Made">Getroffen</option>
- <option value="Missed">Verworfen</option>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement