[OSM-dev] Mod_Tile render and cache based on URL value (source x style combo)
jaslee.st at gmail.com
Mon Aug 1 13:03:07 BST 2011
I am trying to work out if I can get Mod_Tile to dynamically render and
cache maps dynamically based on parameter values read from the incoming URL
I know that it's possible to increase the no. of layers (XML stylesheet
configs) from the default max of 10 by updating the setting in
"render_config.h" and recompiling. But what I would like is the ability to
"mix and match" map sources and map styles.
A simple example, I have 10 thematic maps of an area, one for property value
bands (PROP) in shades of Red, another for crime rates (CRIM) in shades of
Blue, another for pollution index (POLL) in shades of Green etc. So,
initially I have 10 layers with their styles and data sources. I then want
Mod_Tile to render the CRIM source in the same style as the PROP layer
(Shades of Red instead of Blue) and any of the other 9 existing defined
If I wanted the ability to render every combination as a defined layer (XML
file), I would end up with 100 (10x10) stylesheets which is a bit too much.
It would be better to read in a "Style" parameter like
"myMap.html?source=PROP&style=CRIM", so that Mod_Tile could recognize the
"Style" paramter and access the PROP.xml stylesheet and apply the Red styles
BUT select data from the CRIM table source instead of PROP (some
inconsistency relating to normalising values between different sources, but
this is just an example).
This would also mean multiple folders for caching of different combinations
PROP/CRIM, PROP/POLL, CRIM/PROP... etc.
I'd like to know if this is easily possible?
Any help or advice much appreciated. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev