This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Swap Studio Source for GeoJSON</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link | |
rel="shortcut icon" | |
href="https://static-assets.mapbox.com/branding/favicon/v1/favicon.ico" | |
type="image/x-icon" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// usage node getStyleComponents.js > groups.json | |
// looks for a style named style.json, rename to match or use process.argv if you want | |
// then save these ids to an array and toggle with: | |
// layers?.forEach(lyr => map.setLayoutProperty(lyr, "visibility", value)); | |
const style = require("./style.json"); | |
const components = style.layers.reduce((map, lyr) => { |
OlderNewer