News for hackers. Stuff that matters.
Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by untog on Wednesday January 25, 2012 @09:47AM (#3509861)
I am a huge, huge fan of TileMill. I've been making a mobile HTML5-based app that had used the Google Maps API, which is slow on even the most recent phones, and the Custom Tiles, which are limited and now have the potential to be very expensive.

So I ripped the whole lot out and replaced it with some custom TileMill-built map tiles and CloudMade's leaflet.js mapping library. It looks ten times better, works like a native map, and I can even control things like local caching of map tiles, which the Google licenses restrict you from doing. I have the tiles served from an EC2 instance running TileStream, and a CloudFront CDN to cut down on costs- it works great.

That said, it isn't for everyone- I'm lucky in that my app currently NYC-specific, so I only needed NYC map tiles. Those alone took ~9 hours to generate (x2 for separate 'retina display' tiles). I dread to think how long generating a whole world would take.

There's a preview of the tiles here, if anyone is interested: http://www.taxono.my/ . The process isn't quite seamless yet- there were some bugs related to street labels that I couldn't fix (and appear to be related to the underlying Mapnik library). This post has reminded me that I really need to write a full rundown of my experience, but in case you couldn't tell, I'm impressed.

Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by cullenking on Wednesday January 25, 2012 @01:17PM (#3510918)
Rendering a full planet isn't bad, I did up to zoom level 15 in 48 hours. 16 would take probably 48 hours by itself, and 17 would push into another week is my guess. But, mapnik2 is fast enough to render those tiles on the fly without a huge performance hit, about 1 second per metatile (enough to cover a couple small map pans on my big monitor). I am running it on 16gb of ram and a raid10 with 6 2tb drives. My next upgrade will be going full SSD and 196gb of ram, but that will also be a nominatim and pgrouting install, so the ram and SSD's are very important for importing the DB and indexing it inside of 1 month :) Just a tileserver isn't too bad at all.
Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by awj on Wednesday January 25, 2012 @02:21PM (#3511239)
> Those alone took ~9 hours to generate (x2 for separate 'retina display' tiles). I dread to think how long generating a whole world would take.

Map tiles should almost be a canonical example of a ridiculously parallelizable problem. Even if the data access itself is your bottleneck, you can fix that by simply bringing up multiple servers and replicating it.

Unless your map data is so dense that it takes over nine hours to generate a single tile, you can always scale the work out. It's only a matter of justifying the organizational time and whatever expenses are incurred for the extra equipment.

Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by dspringmeyer on Wednesday January 25, 2012 @11:07AM (#3510220)
We're aware of the labeling issues in recent Mapnik and will land a fix soon: https://github.com/mapnik/mapnik/issues/1017
Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by untog on Wednesday January 25, 2012 @11:29AM (#3510337)
That's awesome. Thanks!
Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by incanus77 on Wednesday January 25, 2012 @11:57AM (#3510496)
I'm curious about your experiences with what sounds like a JS maps frontend in an iOS app, versus native Objective-C. Could you elaborate a bit on your decision there?
Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by untog on Wednesday January 25, 2012 @12:21PM (#3510630)
Decision in terms of why I chose JS over Obj-C?

I had intended to make as much of the app cross-platform as possible, so I was predisposed to use HTML5/JS in the first place- 95% of the app will be directly transferable to Android. I'm also not sure if you can use custom map tiles with the native map control in iOS- I've certainly never seen anyone do so. Although I'm not yet taking advantage of it in the app, the ability to cache map tiles locally is also a great plus.

I'm extremely happy with the end result- it really does work as well as the native map control. In fact, I found a demo here:

http://leaflet.cloudmade.com/examples/mobile-example.html

It's a little more work to get it looking as good, but nothing some CSS3 can't fix (box shadows, rounded corners and the like). The story is a little different on Android as pinch-to-zoom doesn't work, but I think that's a WebKit flaw, rather than a leaflet.js flaw.

Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by incanus77 on Wednesday January 25, 2012 @12:43PM (#3510738)
You can't use the native map control (MapKit) but you can use an alternative:

https://github.com/mapbox/route-me https://github.com/mapbox/mbtiles-ios-example https://github.com/mapbox/tilestream-ios-example

The main advantage over JS is the ability to go offline, as well as performance. But that's largely negated if you need to go cross-platform as you do, where I think JS does make a lot of sense.

Re:TileMill 0.9.0 Released with Full Windows Support (and pl... by untog on Wednesday January 25, 2012 @01:00PM (#3510821)
I've played around with extending the T.TileLayer to save remote tiles then try to load then using file:// in the future. It mostly worked, but I didn't have time to totally tweak it- my app is being entered into a competition with a deadline. I fully intend to investigate offline JS maps in the future, though.