Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm testing out Kartograph according to the documentation and a linked gist.

Both my US and non-US layers color correctly, but I can not get the special "sea" layer to fill. I found an example here where similar syntax is filling, so I don't imagine it's a kartograph problem.

I also used the second "special" kartograph layer, graticules, to see whether it had anything to do with special layers. These displayed fine, so I think I can rule out specialness, too.

The sea isn't green

Am I defining the attribute or calling the layer incorrectly?

File: world.json

   "layers": {
     "background": {"special": "sea", "fill": "#ff0000"}, 
     "land": { "src": "ne_110m_admin_0_countries_lakes.shp"}, 
     "the_us": { "src": "ne_110m_admin_1_states_provinces_lakes_shp.shp"}, 
     "mygraticule" : { "special": "graticule", "latitudes": 5, "longitudes": 5}
"bounds": {
    "mode": "bbox", 
    "data": [-150, 18, -50, 80]

File: world.css

#background {
    fill: lightgreen;
    background-color: lightgreen;

#land {
    fill: #f1f1f1;
    opacity: 0.5;

#the_us {
    fill: #c1c1c1;
    opacity: 0.5;

#sea {
    fill: lightgreen;

Run with kartograph -s world.css world.json -o world.svg

share|improve this question
up vote 2 down vote accepted

This depends on the projection. In some projections the sea layer is not generated. I asked the author and told me that is a known bug, to be solved in the next relases. The example you have linked uses the sinusoidal projection. If you try this projection with it in your example it should work.

share|improve this answer
Thanks, that's brilliant. – Mittenchops Jan 15 '13 at 15:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.