Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve #42: Render historic=ruins #63

Merged
merged 2 commits into from
Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions additional.sql
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ insert into zindex (type) values
('waste_disposal'),
('lift_gate'),
('feeding_place'),
('game_feedng'),
('gate');
('game_feeding'),
('gate'),
('ruins');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trosku to dodatocne upravim, lebo brana by mohla mat kludne nizsiu prio ako zrucanina :-)

62 changes: 62 additions & 0 deletions images/ruins.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions style/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const colors = {
water: hsl(210, 65, 65),
waterLabelHalo: hsl(210, 30, 100),
building: hsl(0, 0, 50),
ruin: hsl(0, 0, 60),
track: hsl(0, 33, 25),
forest: hsl(120, 45, 78),
heath: hsl(85, 60, 80),
Expand Down Expand Up @@ -117,6 +118,7 @@ const pois = [
[13, 13, true, true, 'peak', { font: { size: 13, dy: -8 } }],

[14, 15, false, false , 'castle'],
[14, 15, false, false , 'ruins'],
[14, 15, true, true, 'cave_entrance'],
[14, 15, true, true, 'spring', { font: { fill: hsl(216, 100, 50) } }],
[14, 15, true, true, 'waterfall', { font: { fill: hsl(216, 100, 50) } }],
Expand Down Expand Up @@ -312,6 +314,9 @@ function generateFreemapStyle(
.style('buildings')
.rule({ minZoom: 13 })
.polygonSymbolizer({ fill: colors.building })
.style('ruin_polys')
.rule({ minZoom: 13 })
.polygonSymbolizer({ fill: colors.ruin })
.style('protected_areas')
.typesRule(8, 11, 'national_park', 'nature_reserve')
.lineSymbolizer({ stroke: hsl(120, 100, 31), strokeWidth: 3, strokeDasharray: '25,7', strokeOpacity: 0.8 })
Expand Down
8 changes: 8 additions & 0 deletions style/layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ function layers(shading, contours, hikingTrails, bicycleTrails /*, skiTrails*/)
'select geometry, type from osm_buildings',
{ minZoom: 13 },
)
.sqlLayer('ruin_polys',
'select geometry from osm_ruin_polys',
{ minZoom: 13 },
)
.sqlLayer('barrierways',
'select geometry, type from osm_barrierways',
{ minZoom: 16 },
Expand Down Expand Up @@ -193,6 +197,8 @@ function layers(shading, contours, hikingTrails, bicycleTrails /*, skiTrails*/)
union all select building as type, geometry from osm_place_of_worships
union all select building as type, geometry from osm_place_of_worship_polys
union all select type, geometry from osm_transport_points where type = 'bus_stop'
union all select 'ruins' as type, geometry from osm_ruins
union all select 'ruins' as type, geometry from osm_ruin_polys
union all select type, geometry from osm_infopoints) as abc left join zindex using (type)
order by z`,
{ minZoom: 10 },
Expand All @@ -207,6 +213,8 @@ function layers(shading, contours, hikingTrails, bicycleTrails /*, skiTrails*/)
union all select building as type, geometry, name, null as ele from osm_place_of_worships
union all select building as type, geometry, name, null as ele from osm_place_of_worship_polys
union all select type, geometry, name, null as ele from osm_transport_points where type = 'bus_stop'
union all select 'ruins' as type, geometry, name, null from osm_ruins
union all select 'ruins' as type, geometry, name, null from osm_ruin_polys
union all select type, geometry, name, ele from osm_infopoints) as abc left join zindex using (type)
order by z`,
{ minZoom: 10 },
Expand Down