Kartograph Cheat Sheet

A Programming › JavaScript cheat sheet in English by bwaldmann

Kartograph is a simple and lightweight framework for building interactive map applications without Google Maps or any other mapping service.

10,227 views 3,261 downloads 8 Aug 2014 History
3.7 avg · 0 ratings

Structure

{
....proj: {
........id,
........lon0,
........lat0
....},
....la­yers: {
........l­ayer1: {
............src,
............f­ilter,
............a­tt­rib­utes,
............j­oin,
............s­im­plify
........}
....},
....ex­port: {
........w­idth,
........round
....},
....bo­unds: {
........mode,
........data: {
............l­ayer
........}
....}
}

Command Line

kartograph config.json --preview
kartograph config.json -o mymap.svg

Attributes

"­all­"
["IS­O3", "­NAM­E"]
"­iso­": "­ISO­3"

Join

all
true
auto group
"­gro­up-­by": "­CON­T"
define group
"­gro­ups­": { "­1": ["a", "­b", "­c"], "­2": ["x", "­y", "­z"]}
 
"­gro­up-­as": "­id"
buffer
"­buf­fer­": 0.0000001

Filter

is / =
["IS­O3", "­is", "­FRA­"]
 
["IS­O3", "­=", "­FRA­"]
 
{ "­ISO­3": "­FRA­" }
like
["NU­TS", "­lik­e", "­FR%­"]
regex
["NU­TS", "­mat­che­s", "­^FR­\d"]
list
["IS­O", "­in", ["FR­A", "­DEU­", "­ESP­", "­GBR­"]]
 
{ "­ISO­": ["FR­A", "­DEU­", "­ESP­", "­GBR­"] }
>
["AR­EA", "­gre­ate­r", 100000]
<
["AR­EA", "­les­s", 100000]
not
["IS­O", "is not", "­FRA­"]
 
["IS­O", "not like", "­F%"]
and / or
"­and­": [filter_1, filter_2]
nesting
"­or": [ {expre­ssion}, {expre­ssion}]

Badges

Nice Cheat Sheet Good Cheat Sheet Downloaded from Unusual Locations × 1

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.