Can somesone give me an example how can I draw a line from a geojson LineString in harp.gl? The tutorial and the doc missing it.
Currently I'm trying with this in index.js:
fetch('my_data.geojson')
.then(data => data.json())
.then(data => {
const geoJsonDataProvider = new harp.GeoJsonDataProvider("my_data", data);
const geoJsonDataSource = new harp.OmvDataSource({
dataProvider: geoJsonDataProvider,
name: "my_data"
});
map.addDataSource(geoJsonDataSource).then(() => {
const styles = [{
when: "$geometryType == 'line'",
renderOrder: 10000,
attr: {
color: 0x000000fe,
size: 30
}
}]
geoJsonDataSource.setStyleSet(styles);
map.update();
});
});
my_data.geojson generated at geojson.io