I used shields in CartoCss to show the subway stations on my map. When I started to develop the map for mobile devices, I noticed that svg images in shields were destorted hugely and I decided to use markers instead of shields. But then I found that I can`t set min-distance between markers rather than for shields. Before I could draw just one sign of subway entrance with label by setting min-distance between shields. But now markers draw each entrance with label and I have several similar images with labels for one station.

Is it possible to set min-distance for markers somehow? Or maybe there are other ways how to show just one station?enter image description here

1 Answer 1


If this issue applies only to the backend, I would suggest you (assuming that you're running on the Postgis) to use ST_PointOnSurface function. This function provides the center points for a set of features in a little bit more intelligent way than a well-known ST_Centroid.

You could just make a distinct layer that contain center points for the subway stations and show them at the selected zoom levels.

Have no idea how to implement the same trick in CartoCSS. HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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