2

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

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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