From 0fd1ee386abbaf9412ee8c04800cdef5f904e47f Mon Sep 17 00:00:00 2001 From: Adrien Berthet Date: Wed, 10 Jun 2020 14:57:54 +0200 Subject: [PATCH] example: add labels in VRT example --- examples/plugins_vrt.html | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/examples/plugins_vrt.html b/examples/plugins_vrt.html index 7687896e4d..25e4bb7fc2 100644 --- a/examples/plugins_vrt.html +++ b/examples/plugins_vrt.html @@ -58,14 +58,25 @@ parsedData: feature, }); - var velibLayer = new itowns.ColorLayer('velib', { source: velibSource, - style: { + console.log(feature); + + var velibLayer = new itowns.ColorLayer('velib', { + source: velibSource, + style: new itowns.Style({ + zoom: { min: 10, max: 20 }, point: { color: 'cyan', line: 'red', - radius: 5, - } - }}); + radius: 3, + }, + text: { + field: '{name}\nCapacity: {Capacity}', + haloColor: 'white', + haloWidth: 1, + }, + }), + labelEnabled: true, + }); return view.addLayer(velibLayer); }).then(function _(layer) {