block by nitaku fb61dc1f251fd1cbac8e71d48f95fab3

World map V

Full Screen

Continuing the series on implementing a general purpose world map (see the previous attempt), this example introduces a way to solve the placement of labels for countries with faraway territories (like France). In previous solutions, the labels were placed at the centroid of the whole MultiPolygon feature, but this time it is splitted into multiple Polygon features, each labeled independently.

A tooltip is also added to help identifying regions when zoomed out.

index.js

index.html

index.coffee

index.css