Skip to content

Instantly share code, notes, and snippets.

Avatar

Saman Bemel-Benrud samanpwbb

View GitHub Profile
View high-res-print.md

Did you know that mapbox-gl-native supports high resolution exports? It's true. Follow these steps to enable.

  1. Open the console.
  2. Check out mapbox gl native with git clone git@github.com:mapbox/mapbox-gl-native.git
  3. Run make render which kicks off the build process for a CLI tool for making images. After make render succeeds, the CLI tool will be located at ./build/macos/Debug/mbgl-render.
  4. Type ./build/macos/Debug/mbgl-render in the console. If you press return without any arguments, you'll see help output:
Allowed options:
  -s [ --style ] json                 Map stylesheet
View high-res-with-gl-native.md

Did you know that mapbox-gl-native supports high resolution exports? It's true. Follow these steps to enable.

  1. Open the console.
  2. Check out mapbox gl native with git clone git@github.com:mapbox/mapbox-gl-native.git
  3. Run make render which kicks off the build process for a CLI tool for making images. After make render succeeds, the CLI tool will be located at ./build/macos/Debug/mbgl-render.
  4. Type ./build/macos/Debug/mbgl-render in the console. If you press return without any arguments, you'll see help output:
Allowed options:
  -s [ --style ] json                 Map stylesheet
View Good-mapbox.md
View blah.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
body {
font: 16px sans-serif;
margin: 0;
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<style>
body {
font: 16px sans-serif;
margin: 0;
View map.html
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css">
<script src='http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js'></script>
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
View index.html
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css">
<script src='http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js'></script>
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
View gutters.html
<!-- We want three equal columns, left column justified left, right column justified right, with equal gutters for all three columns -->
<div class='col4'>
<div class='space-right1'><!-- content --></div>
</div>
<div class='col4'>
<div class='space-right0 space-left0'><!-- content --></div>
</div>
<div class='col4'>
<div class='space-left1'><!-- content --></div>
View blah.js
// where prop is a form field ID like 'password' or 'username'
setValue(prop, e) {
this.setState({
[prop]: e.target.value
});
}
View gist:e2386787f8702ab350a2
500 'PUT' '/style.json?id=tmstyle:///Users/saman/work_repos/tm2-custom-styles/saman-experiment-dots.tm2' 'Error: labels.mss:95:11 Missing closing ] of filter.'
[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "vector_tile.Tile" because it is missing required fields: (cannot determine missing fields for lite message)
[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "vector_tile.Tile" because it is missing required fields: (cannot determine missing fields for lite message)
[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "vector_tile.Tile" because it is missing required fields: (cannot determine missing fields for lite message)
[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "vector_tile.Tile" because it is missing required fields: (cannot determine missing fields for lite message)
[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "vector_
You can’t perform that action at this time.