1

I want to make a map in tilemill that matches the way that labels are displayed in this example, down to the countries that get labels at each zoom level, which country gets abbrev. vs. full title, using lines to connect labels to smaller countries, etc.

That seems to be the default Mapbox label style (I notice that this Mozilla map acts exactly the same way), since there are no customizations there. However, when creating a new Tilemill map, there are no labels at all. What do I need to do to add labels in exactly the same way as that Mapbox example (i.e., the Mapbox default label styles)?

1

The mapbox streets example was styled using CartoCSS. I don't think the css to style those streets is available for you to copy/paste into tileMill.

Check out this project below. It provides some good examples of CartoCSS styling OSM https://github.com/gravitystorm/openstreetmap-carto

1

The MapBox street style is private, you definitely can't copy it from anywhere.

You can archive similar style ( except for the lines connecting the small countries ) working out with the ScaleRank vs Zoom attributes.

ScaleRank is a hint of how much "importance" the shape have. Importance could be many things like, size, population, etc.

So for example, if you want progressively display their names you need to create some rules like these:

#countries {
   text-size: 0; //Text size is 0 for every country by default


   //ScaleRank = 1 means it is an important country, so if the zoom level <=2 ( which means, at very far level ) starting showing it with size 12
   [ScaleRank<=1][zoom<=2] { text-size: 12; }

   //ScaleRank = 2 means it is quite important, so start showing at zoom 3 and size 10
   [ScaleRank<=2][zoom<=3] {text-size: 10: }
}

I hope you get the strategy, you will end up doing it for many different ScaleRank and Zoom Levels.

Regarding how MapBox street works

It have been a while since mapbox lunched they vector tiles technology. With this technology the source of information ( countries, states, provinces, highway, etc ) are being consolidated in a intermediary database maintained by MapBox. You can easily customize your maps using this database because it came with this kind of features by default. If you are interested on that, you can follow the Tilemill2 development

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.