fix prettier

This commit is contained in:
mike-000
2020-04-16 22:13:12 +01:00
committed by GitHub
parent 3bac7acb48
commit 25b0cce8ed
+3 -9
View File
@@ -89,14 +89,9 @@ fetch(url)
// For tile loading obtain the GeoJSON for the tile coordinate // For tile loading obtain the GeoJSON for the tile coordinate
// before calling the default tileLoadFunction // before calling the default tileLoadFunction
const defaultTileLoadFunction = vectorSource.getTileLoadFunction(); const defaultTileLoadFunction = vectorSource.getTileLoadFunction();
vectorSource.setTileLoadFunction( vectorSource.setTileLoadFunction(function (tile, url) {
function (tile, url) {
const tileCoord = JSON.parse(url); const tileCoord = JSON.parse(url);
const data = tileIndex.getTile( const·data·=·tileIndex.getTile(tileCoord[0],·tileCoord[1],·tileCoord[2]);
tileCoord[0],
tileCoord[1],
tileCoord[2]
);
const geojson = JSON.stringify( const geojson = JSON.stringify(
{ {
type: 'FeatureCollection', type: 'FeatureCollection',
@@ -108,8 +103,7 @@ fetch(url)
tile, tile,
'data:application/json;charset=UTF-8,' + geojson 'data:application/json;charset=UTF-8,' + geojson
); );
} });
);
const vectorLayer = new VectorTileLayer({ const vectorLayer = new VectorTileLayer({
source: vectorSource, source: vectorSource,
}); });