1

I am rendering an interactive world map with Tilemill and I have the problem that the country name for Denmark is placed onto Greenland. This is because Denmark is represented as a multipolygon with polygons for Denmark proper and Greenland, as Greenland is a territorial dependency of Denmark, and because Tilemill only places one text label onto a multipolygon .

My question is if it is possible to influence with Tilemill's cartocss on which of a multipolygon's subpolygons the textlabel is placed. I'd prefer for the text label to appear on continental Denmark.

I have tried the

    text-placement-type: simple;
    text-placements: 'E,W';

properties, hoping that this would select the more east or westward polygon, but to no avail. I have also looked for a way to position a textlabel at an absolute position, but this also does not seem to be possible.

Finally, I would like to avoid manipulating the shapefile, as I am taking it from an external source.

Thanks!

1

If you don't want to add centroids then I think you could use these rules to influence Denmark's label specifically:

text-dy: 1;
text-dx: 1;

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.