Skip to content

Commit

Permalink
flipped min/max scale denominators to get zoom-property functions to …
Browse files Browse the repository at this point in the history
…render properly.
  • Loading branch information
vickdw committed Apr 28, 2017
1 parent ea4b455 commit fe439cd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public StyledLayerDescriptor transform(MBStyle mbStyle) {
maxScaleDenominator = MBObjectStops.zoomLevelToScaleDenominator(rangeForStopLevel[1]);
}

featureTypeStyle = transform(l, mbStyle, minScaleDenominator, maxScaleDenominator);
featureTypeStyle = transform(l, mbStyle, maxScaleDenominator, minScaleDenominator);
// Rule rule = featureTypeStyle.rules().get(0);
//
// rule.setMinScaleDenominator(minScaleDenominator);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 8,
"version": 8,
"name": "Symbols",
"metadata": {
"mapbox:autocomposite": true,
Expand All @@ -26,10 +26,10 @@
"sprite": "file:src/test/resources/org/geotools/mbstyle/sprite/test-data/sprite",
"glyphs": "mapbox://fonts/testUser/{fontstack}/{range}.pbf",
"layers": [
{
{
"id": "county-fill",
"type": "fill",
"minzoom": 10,
"minzoom": 0,
"source": "test-source",
"source-layer": "test-source-layer",

Expand All @@ -38,21 +38,23 @@
},
"paint": {
"fill-color": {
"property": "POP2000",
"base": 0.2,
"stops": [
[{"zoom": 0, "value": 100000}, "AliceBlue"],
[{"zoom": 0, "value": 600000}, "MidnightBlue"],
[{"zoom": 10, "value": 100000}, "Red"],
[{"zoom": 10, "value": 600000}, "Green"]]
"property": "POP2000",
"base": 0.2,
"stops": [
[{"zoom": 0, "value": 30000}, "AliceBlue"],
[{"zoom": 0, "value": 100000}, "MidnightBlue"],
[{"zoom": 10, "value": 30000}, "Yellow"],
[{"zoom": 10, "value": 100000}, "Blue"],
[{"zoom": 20, "value": 30000}, "Red"],
[{"zoom": 20, "value": 100000}, "Green"]]
},
"fill-opacity": 0.5
}
},
{
"id": "county-outline",
"type": "line",
"minzoom": 10,
"minzoom": 10,
"source": "test-source",
"source-layer": "test-source-layer",
"layout": {
Expand All @@ -74,7 +76,7 @@
}
}
},
{
{
"id": "county-label",
"type": "symbol",
"source": "testsource",
Expand All @@ -95,8 +97,8 @@
"text-anchor": "CENTER",
"text-field": "{NAME}",
"text-font": ["Some Test Font", "Other Test Font"],
"text-allow-overlap": true,
"text-allow-overlap": true,

},
"paint": {
"icon-opacity": 0.5,
Expand All @@ -109,12 +111,12 @@
"text-halo-color": "White"
}
}

],
"created": "2017-02-14T16:14:54.215Z",
"id": "ciz5qbyd3007j2spd3flvk2uh",
"modified": "2017-02-14T17:56:14.670Z",
"owner": "testUser",
"visibility": "private",
"draft": false
}
}

0 comments on commit fe439cd

Please sign in to comment.