martinduparc edited this page Nov 10, 2014 · 12 revisions

Installing and using Crosslet


External dependencies

You have to include them explicitly in the code

In the head of the html doc:

<link rel="stylesheet" href="" />

In the bottom of the file:

<script src=""></script>
<script src="//"></script>
<script src="//"></script>
<script src="//"></script>
<script src="//"></script>

Embedded dependencies

These are already in the code, you don't have to download them separately:

Downloading Source

TL;DR : download here.

Javascript source file is located in the /dist directory.

  • For production, use crosslet-min.js
  • In case if you already use cie.js and crosslet.js in your code, you can use crosslet-raw-min.js
  • For debugging purposes, use the versions of files without "min" in it

Once downloaded, include it in your document as well:

<script src="crosslet-min.js"></script>

Using Crosslet

Minimal configuration

var config = {
  map: {
    leaflet: {
      key: "<your key>",
    view: {
      center: [40.42, -98.73],
    geo: {
      url: "data/us_counties.topo.json",
      name_field: "NAME",
      id_field: "GEOID",
      topo_object: "us_counties"
  data: {
    version: "1.0",
    id_field: "fips"
  dimensions: {
    obama: {
      title: "Obama",
      data: {
        dataSet: "data/us_elect_county.csv",
        field: "obama_p",
  defaults: {
   order: ["obama"],
    active: "obama"

See also Developer's Reference and Tutorial for further info.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.