Fixing high zoom levels, adding test. Addresses #48, needs confirmation

This commit is contained in:
Tom MacWright 2011-08-19 14:46:43 -04:00
parent 2a9f4d5523
commit 86e79b9b2c
4 changed files with 79 additions and 5 deletions

View File

@ -54,11 +54,11 @@ tree.Zoom.ranges = {
16: 12500, 16: 12500,
17: 5000, 17: 5000,
18: 2500, 18: 2500,
19: 1000, 19: 1500,
20: 500, 20: 750,
21: 250, 21: 500,
22: 100, 22: 250,
23: 50 23: 100
}; };
// Only works for single range zooms. `[XXX....XXXXX.........]` is invalid. // Only works for single range zooms. `[XXX....XXXXX.........]` is invalid.

View File

@ -0,0 +1,14 @@
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Stylesheet": [
"highzooms.mss"
],
"Layer": [{
"name": "world",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
"type": "shape"
}
}]
}

View File

@ -0,0 +1,9 @@
#world {
polygon-fill: #000;
[zoom=22] { polygon-fill: #f00000; }
[zoom=21] { polygon-fill: #0f0000; }
[zoom=20] { polygon-fill: #00f000; }
[zoom=19] { polygon-fill: #000f00; }
[zoom=18] { polygon-fill: #0000f0; }
[zoom=17] { polygon-fill: #00000f; }
}

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[]>
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<Style name="world" filter-mode="first">
<Rule>
<MaxScaleDenominator>5000</MaxScaleDenominator>
<MinScaleDenominator>2500</MinScaleDenominator>
<PolygonSymbolizer fill="#00000f" />
</Rule>
<Rule>
<MaxScaleDenominator>2500</MaxScaleDenominator>
<MinScaleDenominator>1500</MinScaleDenominator>
<PolygonSymbolizer fill="#0000f0" />
</Rule>
<Rule>
<MaxScaleDenominator>1500</MaxScaleDenominator>
<MinScaleDenominator>750</MinScaleDenominator>
<PolygonSymbolizer fill="#000f00" />
</Rule>
<Rule>
<MaxScaleDenominator>750</MaxScaleDenominator>
<MinScaleDenominator>500</MinScaleDenominator>
<PolygonSymbolizer fill="#00f000" />
</Rule>
<Rule>
<MaxScaleDenominator>500</MaxScaleDenominator>
<MinScaleDenominator>250</MinScaleDenominator>
<PolygonSymbolizer fill="#0f0000" />
</Rule>
<Rule>
<MaxScaleDenominator>250</MaxScaleDenominator>
<PolygonSymbolizer fill="#f00000" />
</Rule>
<Rule>
<MinScaleDenominator>5000</MinScaleDenominator>
<PolygonSymbolizer fill="#000000" />
</Rule>
</Style>
<Layer
name="world"
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>world</StyleName>
<Datasource>
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
<Parameter name="type"><![CDATA[shape]]></Parameter>
</Datasource>
</Layer>
</Map>