Skip to content

Commit

Permalink
Merge branch 'master' of github.com:simplegeo/polymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Oct 10, 2010
2 parents 9ff7032 + dfd5375 commit a7fb3ac
Show file tree
Hide file tree
Showing 89 changed files with 49 additions and 6,713 deletions.
142 changes: 1 addition & 141 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,119 +27,6 @@ JS_COMPILER = \
java -jar lib/google-compiler/compiler-20100616.jar \
--charset UTF-8

WWW_FILES = \
polymaps.min.js \
lib/nns/nns.min.js \
lib/blueprint/screen.css \
lib/modernizr/modernizr.min.js \
lib/colorbrewer/colorbrewer.css \
lib/protovis/protodata.min.js \
www/.htaccess \
www/index.html \
www/download.html \
www/forkme.png \
www/git-16x16.png \
www/zip-16x16.png \
www/zip-128x128.png \
www/logo-big.js \
www/logo-big.png \
www/logo-small.js \
www/logo-small.png \
www/style.css

WWW_EX_FILES = \
examples/canvas/procedural.js \
examples/canvas/mandelbrot-worker.js \
examples/cluster/kmeans.js \
examples/overlay/sf1906.png \
examples/population/population.css \
examples/statehood/fips.js \
examples/streets/streets.json \
examples/tilestache/dot.gif \
examples/transform/nypl.js \
examples/unemployment/unemployment-data.js \
examples/world/internet.tsv \
examples/world/population.tsv \
examples/world/tsv.js \
examples/world/world.json \
www/ex/index.html \
www/ex/bing.html \
www/ex/bing-s.png \
www/ex/bing-m.png \
www/ex/blue-marble.html \
www/ex/blue-marble-s.png \
www/ex/blue-marble-m.png \
www/ex/cluster.html \
www/ex/cluster-s.png \
www/ex/cluster-m.png \
www/ex/flickr.html \
www/ex/flickr-s.png \
www/ex/flickr-m.png \
www/ex/grid.html \
www/ex/grid-s.png \
www/ex/grid-m.png \
www/ex/mandelbrot.html \
www/ex/mandelbrot-m.png \
www/ex/midnight-commander.html \
www/ex/midnight-commander-s.png \
www/ex/midnight-commander-m.png \
www/ex/overlay.html \
www/ex/overlay-s.png \
www/ex/overlay-m.png \
www/ex/pale-dawn.html \
www/ex/pale-dawn-s.png \
www/ex/pale-dawn-m.png \
www/ex/population.html \
www/ex/population-s.png \
www/ex/population-m.png \
www/ex/shadow.html \
www/ex/shadow-s.png \
www/ex/shadow-m.png \
www/ex/statehood.html \
www/ex/statehood-s.png \
www/ex/statehood-m.png \
www/ex/streets.html \
www/ex/streets-s.png \
www/ex/streets-m.png \
www/ex/tiles.html \
www/ex/tiles-s.png \
www/ex/tiles-m.png \
www/ex/transform.html \
www/ex/transform-s.png \
www/ex/transform-m.png \
www/ex/unemployment.html \
www/ex/unemployment-s.png \
www/ex/unemployment-m.png \
www/ex/world.html \
www/ex/world-s.png \
www/ex/world-m.png

WWW_DOCS_FILES = \
www/docs/arrow.html \
www/docs/cache.html \
www/docs/compass.html \
www/docs/dblclick.html \
www/docs/dispatch.html \
www/docs/drag.html \
www/docs/geoJson.html \
www/docs/grid.html \
www/docs/hash.html \
www/docs/image.html \
www/docs/index.html \
www/docs/interact.html \
www/docs/layer.html \
www/docs/map.html \
www/docs/ns.html \
www/docs/queue.html \
www/docs/stylist.html \
www/docs/svg.html \
www/docs/transform.html \
www/docs/url.html \
www/docs/wheel.html

PYGMENT = /Library/Pygments-1.3.1/pygmentize
PYGMENT_STYLE = trac

all: polymaps.min.js polymaps.js

%.min.js: %.js
Expand All @@ -154,32 +41,5 @@ polymaps.js: $(JS_FILES) Makefile
cat $(JS_FILES) >> $@
chmod a-w $@

%.d: %.m4 Makefile www/m4d.sh
@www/m4d.sh $< > $@

%.d: %.html
@touch $@

-include $(patsubst %.html,%.d,$(filter %.html,$(WWW_EX_FILES)))

html: $(WWW_FILES) $(WWW_EX_FILES) $(WWW_DOCS_FILES) Makefile
rm -rf $@
mkdir $@ $@/ex $@/docs
cp $(WWW_FILES) $@
cp $(WWW_EX_FILES) $@/ex
cp $(WWW_DOCS_FILES) $@/docs

%.html: %.m4 Makefile
rm -f $@
cd $(dir $<) && m4 -P < $(notdir $<) > $(notdir $@)
chmod a-w $@

%.js.html: %.js Makefile
$(PYGMENT) -f html -O cssclass=syntax,style=$(PYGMENT_STYLE) -l js $(filter %.js,$^) > $@

%.js.txt: %.js Makefile
cat $(filter %.js,$^) > $@

clean:
rm -rf polymaps.js polymaps.min.js html
rm -f $(patsubst %.html,%.d,$(filter %.html,$(WWW_EX_FILES)))
rm -rf polymaps.js polymaps.min.js
96 changes: 48 additions & 48 deletions README.mkd
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
_ _ | _ _ _ _ _
|_)(_)|\/| | |(_||_)_\
| / |
# Polymaps

Polymaps is a BSD-licensed display and interaction library for tile-based vector
and raster maps using SVG and Javascript.
Polymaps is a free JavaScript library for making dynamic, interactive maps in
modern web browsers. See <http://polymaps.org> for more details.

Our intent is to provide a minimal, extensible, customizable, and free display
library for discriminating designers and developers who want to use interactive
maps in their own projects. Polymaps provides a core set of features in a tight,
clean package, with plenty of hooks for additional functionality.
This is the `master` branch, which contains the Polymaps source code. If
you're looking for the Polymaps website, you should checkout the `gh-pages`
branch instead.

## Viewing Examples

CAVEATS, FEATURE REQUESTS AND KNOWN BUGS
You'll find lots of Polymaps examples in the suitably-named `examples`
directory. Open any of the HTML files there in your browser to view the
examples, or open them in your text editor of choice to view the source. Most
of the examples are replicated on the [Polymaps website](http://polymaps.org),
though a few of them are only visible locally.

Browser Support:
Some of the examples depend on third-party libraries, such as jQuery. These
third-party libraries are not required to use Polymaps but can certainly make
it easier! All third-party libraries should be stored in the `lib` directory,
with an associated `LICENSE` file and optional `README`.

- Tested in recent Webkit browsers (Safari 4+, Chrome 6, Webkit nightlies)
- Tested in recent Firefox browsers (3.6+)
- Optimistic about Opera, IE9, but not part of core testing yet.
- SVG is *required*, even for image display...
- in other words: if you can't require SVG, don't use Polymaps!
## Filing Bugs

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

- Vector overlays in GeoJSON format are supported, both tiled and single file
- Image layers in Google-y spherical mercator format are supported
- There are *no default markers* or infobubbles (yet?)
<http://github.com/simplegeo/polymaps/issues>

API:
You are welcome to file issues either for bugs in the source code, feature
requests, or issues with the Polymaps website.

- No defensive copying (on input or output).
- No type coercion (e.g., String -> Number for zoom).
- Using == instead of ===.
- Many properties cannot be changed after load (e.g., tile size, URL).
- No (easy) way to lookup a GeoJSON elements by feature id.
- Missing in-code documentation, API reference.
- Include support (not just examples) for TileCache, TileStache, Bing?
## Support

Events:
If you have questions or problems regarding Polymaps, you can get help by
joining the `#polymaps` IRC channel on irc.freenode.net. You are also welcome
to send GitHub messages or tweets to `mbostock`.

- "move" event does not distinguish zoom / pan / zoom+pan events.
- "show" events are not supported on image tiles.
- There are no corresponding "unload" or "hide" events.
- There is no "error" event if a tile fails to load.
- Arrow control pans three times for two keydowns.
## Build Instructions

Sizing:
You do not need to build Polymaps in order to view the examples; a compiled
copy of Polymaps (`polymaps.js` and `polymaps.min.js`) is included in the
repository.

- Maps with no explicit size are auto-resized on window resize;
- This may miss resize based on DOM changes (e.g., element removal).
- This may generate spurious resize events for fixed-size parents.
- If the map is bigger than its parent, tiles are not automatically clipped.
To edit and build a new version of Polymaps, 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](http://developer.apple.com/technologies/xcode.html). Once you've setup
your development environment, you can rebuild Polymaps by running the
following command from the repo's root directory:

Tiles:
make

- Assumes Mercator projection, with Google-y transform.
- Anti-aliasing artifacts are visible with smooth zooming / rescaled tiles.
- When translucent tiles are rescaled, they can overlap with other resolutions.

Queue:

- Should prioritize tile requests from the center out.
- Create host-specific queues to allow more than 6 simultaneous requests?
The Polymaps 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 `polymaps.js`. Second, this file
is put through Google's [Closure
Compiler](http://code.google.com/closure/compiler/) to minify the JavaScript,
resulting in a smaller `polymaps.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.
3 changes: 0 additions & 3 deletions www/.htaccess

This file was deleted.

37 changes: 0 additions & 37 deletions www/Logo.java

This file was deleted.

Loading

0 comments on commit a7fb3ac

Please sign in to comment.