This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How can I start TileMill that it will be centered on specified area and zoomed in?

3

I am loading and testing very small area. But currently started TileMill is not centering on area with data, it displays map of the entire world. As it generates tiles it takes some time to reach area that I wanted to see.

Is there some way to provide parameters from program or edit some config file that I would not need to pan through entire world looking for this 5km x 5km area that is rendered?

asked 25 Jun '14, 06:42

Bulwersator's gravatar image

Bulwersator
468121625
accept rate: 14%

edited 25 Jun '14, 06:42


One Answer:

5

There's a "project.mml" file that controls your layers; it is a JSON file that has, usually right at the beginning, a section like

"center": [
  -77.036,
  38.9013,
  12
],

change these values to the coordinates and zoom level you require, and you'll be fine.

answered 25 Jun '14, 07:02

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

Is it possible to override it? This file is tracked by repository so I would prefer to not modify it - see https://github.com/gravitystorm/openstreetmap-carto/blob/master/project.mml

(25 Jun '14, 07:34) Bulwersator
3

Not that I'm aware of, but I find it pretty annoying too. If I knew how to write the plugins for Tilemill I'd create a bookmarks plugin, since every time I start work on openstreetmap-carto I spend minutes trying to pan and zoom to where I want to work.

(25 Jun '14, 08:48) Andy Allan

My search failed to find relevant ticket so I reported it as https://github.com/mapbox/tilemill/issues/2358

Not that I expect implementation.

(30 Jun '14, 12:00) Bulwersator
3

You could try to work around this by stashing your "private" coordinates with Git.

See: Git - Stashing

(30 Jun '14, 12:18) cartinus

I will also try exporting from command line - see https://www.mapbox.com/tilemill/docs/manual/exporting/

(30 Jun '14, 16:25) Bulwersator
1

This is one of the reasons I wrote the (tiny, hackish) Sputnik, so that map views could be bookmarkable: https://github.com/systemed/sputnik

(30 Jun '14, 21:50) Richard ♦
showing 5 of 6 show 1 more comments

Source code available on GitHub .