forked from simplegeo/polymaps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:simplegeo/polymaps
- Loading branch information
Showing
89 changed files
with
49 additions
and
6,713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <https://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](https://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?) | ||
<https://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](https://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](https://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. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.