🎨 adding landuse and new base dark style

pull/7/head
Michael Straßburger 2016-11-09 03:08:40 +01:00
rodzic 74a4dffbe7
commit d10ed9159f
4 zmienionych plików z 1546 dodań i 105 usunięć

Wyświetl plik

@ -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
@ -254,7 +261,7 @@ module.exports = class Renderer
lastY = null
outside = false
scaled = []
#seen = {}
# seen = {}
for point in points
x = Math.floor tile.position.x+(point.x/tile.scale)
@ -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

Wyświetl plik

@ -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

Wyświetl plik

@ -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,

Plik diff jest za duży Load Diff