All examples By author By category About

nitaku

World map V

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.