Skip to content

mapsense/mapsense.js

Repository files navigation

Mapsense.js

Mapsense.js is a JavaScript library for vector maps in the browser. It brings the scalability of tiled geographic datasets to the interactivity, control, and dynamism of D3. A D3 selection is maintained across incoming tiles, letting you set things like styles or interaction just once. Mapsense.js is based on the Polymaps API, but uses D3 to handle drawing and selection.

See http://mapsense.github.io/mapsense.js for more details.

Filing Bugs

We use GitHub to track issues. You can search for existing issues, and file new issues, here:

http://github.com/mapsense/mapsense.js/issues

We will occassionally address issues filed under http://github.com/simplegeo/polymaps/issues as well.

Build Instructions

There is no need to build in order to start using the library; compiled copies (mapsense.js and mapsense.min.js) are included in the repository.

To edit and build a new version of Mapsense.js, you must first install Java and GNU Make. If you are on Mac OS X, you can install Make as part of the UNIX tools included with XCode. Once you've setup your development environment, you can rebuild Polymaps by running the following command from the repo's root directory:

make

The build process is exceptionally simple. First, all the JavaScript files are concatenated (using cat); the order of files is important to preserve dependencies. This produces the file mapsense.js. Second, this file is put through Google's Closure Compiler to minify the JavaScript, resulting in a smaller mapsense.min.js.

If you are doing development, it is highly recommended that you use the non-minified JavaScript for easier debugging. The minified JavaScript is only intended for production, where file size matters. Note that the development version is marked as read-only so that you don't accidentally overwrite your edits after a re-build.