maps for developers

The (former) official Mapbox blog. See mapbox.com/blog for current content.

Follow publication

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Written by Mapbox

mapping tools for developers + precise location data to change the way we explore the world

Responses (9)

Write a response

Looks like the code link should be https://github.com/mapbox/polylabel/blob/master/polylabel.js (not index.js).

--

I sovled this problem by creating a Voronoi Diagram. One of the cells inside the polygon has to have a vertex which is mathematicaly the center of the polygon.

--

dist

I think this is min distance to polygon

--