Skip to content

Commit f93a5ce

Browse files
committed
03 slides
1 parent f8d116a commit f93a5ce

File tree

8 files changed

+101
-6
lines changed

8 files changed

+101
-6
lines changed
79 KB
Loading
36.1 KB
Loading
56.9 KB
Loading
48.5 KB
Loading
40.9 KB
Loading
34.8 KB
Loading
341 KB
Loading

slides/03_cartoCSS-tilemill/index.html

Lines changed: 101 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,48 @@
44
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
55
<link href='../big.css' rel='stylesheet' type='text/css' />
66
<style>
7-
.gdb {
8-
background-image: url(./images/gdb.png);
7+
.carto-multi {
8+
background-image: url(./images/carto-multi.png);
9+
background-repeat: no-repeat;
10+
background-position: center 1px;
11+
background-size:60%;
12+
}
13+
.carto-ref1 {
14+
background-image: url(./images/carto-ref1.png);
15+
background-repeat: no-repeat;
16+
background-position: center 1px;
17+
background-size:100%;
18+
}
19+
.carto-ref2 {
20+
background-image: url(./images/carto-ref2.png);
21+
background-repeat: no-repeat;
22+
background-position: center 1px;
23+
background-size:100%;
24+
}
25+
.carto-ref3 {
26+
background-image: url(./images/carto-ref3.png);
27+
background-repeat: no-repeat;
28+
background-position: center 1px;
29+
background-size:100%;
30+
}
31+
.carto-ref4 {
32+
background-image: url(./images/carto-ref4.png);
33+
background-repeat: no-repeat;
34+
background-position: center 1px;
35+
background-size:100%;
36+
}
37+
.carto-ref5 {
38+
background-image: url(./images/carto-ref5.png);
39+
background-repeat: no-repeat;
40+
background-position: center 1px;
41+
background-size:100%;
42+
}
43+
.mb-studio1 {
44+
background-image: url(./images/mb-studio1.png);
945
background-repeat: no-repeat;
1046
background-position: center 1px;
1147
background-size:100%;
1248
}
13-
1449

1550
/*Text Style*/
1651
body {
@@ -40,6 +75,10 @@
4075
.imageTextLight {
4176
text-shadow:0px 0px 7.5px rgba(34,34,34,0.95);
4277
}
78+
code {
79+
font-family: "courier new";
80+
font-size: 64;
81+
}
4382
</style>
4483
<script src='../big.js'></script>
4584
</head>
@@ -64,13 +103,69 @@ <h2>Goals:</h2>
64103
</ul>
65104
</div>
66105
<div>What is CartoCSS?</div>
67-
<div>Look at HTML/CSS relationship</div>
68-
<div>What does CartoCSS do?</div>
69-
<div>Look at the reference</div>
106+
<div>A styling language used in TileMill/Mapbox Studio</div>
107+
<div>It may be helpful to look at HTML/CSS relationship</div>
108+
<div>Use CSS to select HTML and element/tag/class/id and add style</div>
109+
<div><a href="http://codepen.io/maptastik/pen/jEbdRm" target="_blank">example</a></div>
110+
<div>CartoCSS is similar in <em>syntax</em> &amp; <em>function</em></div>
111+
<div>
112+
<code>#layer {
113+
symbolizer: value;
114+
}
115+
</code></div>
116+
<div>Allows you to target map features...</div>
117+
<div>...and manipulate various aspects of their appearance</div>
118+
<div>You can style...</div>
119+
<div>points, lines, &amp; polygons</div>
120+
<div>rasters</div>
121+
<div>text</div>
122+
<div>buildings</div>
123+
<div>and more!</div>
124+
<div>And there are lots of symbolizing options for different types of features<br>(<a href="https://github.com/mapbox/carto/blob/master/docs/latest.md" target="_blank">see Reference</a>)</div>
125+
<div data-bodyclass="carto-ref1"></div>
126+
<div data-bodyclass="carto-ref2"></div>
127+
<div data-bodyclass="carto-ref3"></div>
128+
<div data-bodyclass="carto-ref4"></div>
129+
<div data-bodyclass="carto-ref5"></div>
130+
<div>Read on a painter's model</div>
131+
<div class="center-text"><p><em>top</em><br>&darr;<br><em>bottom</em></p></div>
132+
<div>You can stack styles for the same layer</div>
133+
<div data-bodyclass="carto-multi"></div>
70134
<div>What is TileMill?</div>
135+
<div>Map design program</div>
136+
<div>Can handle a variety of geographic data formats</div>
137+
<div>
138+
<h2>Vector</h2>
139+
<ul>
140+
<li>shp</li>
141+
<li>kml</li>
142+
<li>csv</li>
143+
<li>geoJSON</li>
144+
<li>PostGIS</li>
145+
</ul>
146+
</div>
147+
<div>Raster: GeoTIFF</div>
148+
<div>
149+
<h4>Exports to a variety of formats</h4>
150+
<ul>
151+
<li>png</li>
152+
<li>svg</li>
153+
<li>pdf</li>
154+
<li>mapnik XML</li>
155+
<li><em>mbtiles</em></li>
156+
</ul>
157+
</div>
71158
<div>What about Mapbox Studio?</div>
159+
<div data-bodyclass="mb-studio1"></div>
160+
<div data-bodyclass="mb-studio1 imageTextLight">
161+
<ul>
162+
<li>vector tiles</li>
163+
<li>Style OSM data directly</li>
164+
</ul>
165+
</div>
72166
<div>Activity 1: Make an interactive choropleth map</div>
73167
<div>Activity 2: Put our choropleth on top of a basemap</div>
168+
<div>Activity 3: Remake the whole map using geoJSON &amp; Leaflet</div>
74169

75170
</body>
76171
</html>

0 commit comments

Comments
 (0)