🎨 adding landuse and new base dark style

This commit is contained in:
Michael Straßburger 2016-11-09 03:08:40 +01:00
parent 74a4dffbe7
commit d10ed9159f
4 changed files with 1546 additions and 105 deletions

View File

@ -14,7 +14,7 @@ Styler = require './Styler'
Tile = require './Tile'
utils = require './utils'
simplify = require 'simplify-js'
#simplify = require 'simplify-js'
module.exports = class Renderer
cache: {}
@ -29,17 +29,20 @@ module.exports = class Renderer
#"poi_label", "water",
drawOrder: [
"admin"
"landuse"
"water"
"marine_label"
"building"
"road"
"admin"
"country_label"
"state_label"
"water_label"
"place_label"
"rail_station_label"
"poi_label"
"road_label"
"housenum_label"
]
@ -243,8 +246,12 @@ module.exports = class Renderer
if @labelBuffer.writeIfPossible text, x, point[1], feature, margin
@canvas.text text, x, point[1], feature.color
else if @config.layers[feature.layer]?.cluster and @labelBuffer.writeIfPossible "X", point[0], point[1], feature, 3
break
else if @config.layers[feature.layer]?.cluster and
@labelBuffer.writeIfPossible "X", point[0], point[1], feature, 3
@canvas.text "", point[0], point[1], feature.color
break
true
@ -291,7 +298,7 @@ module.exports = class Renderer
return []
# else
# scaled = ([point.x, point.y] for point in simplify scaled, 2, false)
#
# if filter
# if scaled.length is 2
# if @_seen[ka = (scaled[0]<<8)+scaled[1]] or

View File

@ -20,7 +20,7 @@ module.exports = class Termap
source: "http://nachbar.io/data/osm2vectortiles/"
#source: __dirname+"/../mbtiles/regensburg.mbtiles"
styleFile: __dirname+"/../styles/bright.json"
styleFile: __dirname+"/../styles/dark.json"
initialZoom: null
maxZoom: 18

View File

@ -72,7 +72,7 @@ class Tile
# TODO: monkey patching test case for tiles with a reduced extent 4096 / 8 -> 512
# use feature.loadGeometry() again as soon as we got a 512 extent tileset
geometries = feature.@_reduceGeometry feature, 8
geometries = feature.loadGeometry() #@_reduceGeometry feature, 8
if style.type is "fill"
nodes.push @_addBoundaries true,

File diff suppressed because it is too large Load Diff