mirror of
https://github.com/rastapasta/mapscii.git
synced 2024-11-24 17:13:57 +01:00
🎨 adding landuse and new base dark style
This commit is contained in:
parent
74a4dffbe7
commit
d10ed9159f
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
1628
styles/dark.json
1628
styles/dark.json
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user