WHAT DOES THIS DO?
This script renders 256*256 pixel tiles that can be used with Leaflet or OpenLayers.
In addition, it writes index.html for you so this is a sort of one-click solution. It uses a hosted version of Leaflet, so you don't have to download anything extra.
You can easily test the script by downloading the example blend file from here:
NOTE: You'll see some library errors when you open the file. Just ignore them.
There is a simple city model. Just move cursor to the script window and press Alt-P. This should render tiles and then popup your default browser in order to view the result.
USAGE and SETTINGS:
First you must set your camera. Set it to ortographic and adjust the Ortogrphic scale so that you can see your whole model through the camera (see the example blend)
Setting must be done in the script file.
defaultLevel = 2 # default level in browser
maxLevel = 2 # starting from zero
tilesDir = 'tiles' # the name of the tiles directory
DefaultLevel is the default zoom, when the page is opened.
MaxLevel is the maximum zoom level.
ABORTING THE SCRIPT:
The script can run hours if you use large maxLevel (> 7). Therefore script can be terminated with Ctrl-C in the terminal window. So make sure you start Blender from command line if you need this feature.
It would be nice if some Mac and Windows users could test the script. It should work on those platforms also but I can't test it myself.
I planning to convert this to a proper addon, but just now I don't have time. I'll also add support for markers so that you can easily set markers for objects.
This was written for my own purposes but I hope that it would be useful for some else too.