Description
This project is not maintained anymore. The original author decided to move on with his life.
Here are a few reasons why I stopped working on kartograph.js:
kartograph.js alternatives and similar libraries
Based on the "Maps" category.
Alternatively, view kartograph.js alternatives based on common mentions on social networks and blogs.
-
polymaps
Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers. -
polygon-clipping
Apply boolean polygon clipping operations (union, intersection, difference, xor) to your Polygons & MultiPolygons. -
@terraformer
A geographic toolkit for dealing with geometry, geography, formats, and building geodatabases -
tle.js
π°οΈ Satellite TLE tools in JavaScript: get lat/lon of satellites, get look angles, plot orbit lines, extract individual TLE elements, etc
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of kartograph.js or a related project?
README
This project is not maintained anymore.
Here are a few reasons why I stopped working on kartograph.js:
- there's no need to support non-SVG browsers anymore, so if I would touch kartograph.js again I would through out the Raphael.js dependency, which would result in a complete re-write which I don't want to spend my time on, because...
- d3.js is an amazing library that can do all the vector mapping that you need! Also d3.js has much more map projections and is more fun to work with.
- Finally, TopoJSON beats SVG as vector geo data format.
So, thanks for the good time we had!
Of course, if you still want to take over from here, kartograph.js is all yours. Just send me an email.
Kartograph.js
Kartograph.js is a JavaScript library that renders SVG maps in web browsers. It is built on top of jQuery and RaphaelJS. Please have a look at the API docs for more details.
Initializing a new map
map = $K.map('#map', 600, 400);
map.loadMap('world.svg', function() {
map.addLayer('countries', {
styles: {
fill: '#ee9900'
},
title: function(d) {
return d.countryName;
}
});
});
```
Choropleth maps (aka coloring map polygons based on data):
```javascript
pop_density = { 'USA': 123455, 'CAN': 232323, ... };
colorscale = new chroma.ColorScale({
colors: chroma.brewer.YlOrRd,
limits: chroma.limits(chroma.analyze(pop_density), 'k-means', 9)
});
map.getLayer('countries').style('fill', function(data) {
return colorscale.get(pop_density[data.iso]);
});
```
Adding symbols is easy, too:
```javascript
cities = [{ lat: 43, lon: -75, label: 'New York', population: 19465197 }];
map.addSymbols({
data: cities,
location: function(d) {
return [d.lon, d.lat];
},
type: Kartograph.Bubble,
radius: function(d) {
return Math.sqrt(d.population) * 0.001;
}
})
```
### Author
Kartograph was created by [Gregor Aisch](http://github.com/gka/). It is supported by [Piwik Web Analytics](http://piwik.org) and the [Open Knowledge Foundation](http://okfn.org).
### License
Kartograph.js is licensed under [LGPL](http://www.gnu.org/licenses/lgpl-3.0.txt)
*Note that all licence references and agreements mentioned in the kartograph.js README section above
are relevant to that project's source code only.