Support Staff2 Posted by Will White on 16 Apr, 2011 03:13 PM
I assume open layers makes it easy to serve up multiple tile
layers? Do you have any docs or a blog post on how to do this?
OpenLayers can composite multiple tile layers together, but we
are experimenting more with Modest Maps these
days, which has a much simpler API. Modes Maps does not, however,
support multiple layers out of the box, so lately we have been
combining a baselayer and overlay into a single flattened tileset
Is there anywhere you can point to re: styling the second
layers. The aliasing on the edges is beautiful and I'm wondering
how you handle the opacity.
We don't have any docs about this specifically. TileMill should
make the edges look smooth and allow you to do opacity. I can check
with AJ to see if he has any tips.
To do the color coding, do you just manually add data columns to
the shape files in qgis or is there a way to assign these values
Yes, each polygon has a style applied based on a column in the
shape file. There are several styles and each has a different color
and applies to a different range of values.
Do you have any documentation yet on using tilelive.js to handle
mouseovers? Is it ready to use or better to wait? I don't mind some
loose edges :)
tilelive.js is nice because it allows you to render tiles with
more dynamic data, but the documentation is a bit lacking right
now. Are you set on using tilelive.js? If possible, I encourage you
to try TileStream, which can serve interaction data out of an
MBTiles file. You can create interactive tilesets with the dev
version of TileMill on GitHub (access the options in the project
settings), then export it as MBTiles. Copy it over to TileStream
for hosting, and use the wax library to add the map to your
application. There is some brand new documentation about using the
library with Modest Maps.
This documentation for the client side applies whether your
using TileStream or tilelive.js to serve the interaction data.
I realize going the tile layer approach looks MUCH nicer but
it's also less dynamic. Do you have any general guidelines on when
it makes sense to use the tile approach in terms of number of polys
on a screen with openlayers? I realize polymaps uses SVG but do you
think it's a good alternative?
Polymaps isn't an option for us because we need good IE support.
Polymaps also feels a little sluggish compared to Modest Maps. As
for how many polygons you can have before switching to rasterized
tiles, it all depends on the complexity of the polygons and your
desire for speed. The browser is going to be sluggish even if you
have a single sufficiently complex polygon. We currently use tiles
for all polygons and do not render any in the browser, but our data
has been static enough to allow for this.