fix prettier
This commit is contained in:
+15
-21
@@ -89,27 +89,21 @@ 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(tileCoord[0],·tileCoord[1],·tileCoord[2]);
|
||||||
const data = tileIndex.getTile(
|
const geojson = JSON.stringify(
|
||||||
tileCoord[0],
|
{
|
||||||
tileCoord[1],
|
type: 'FeatureCollection',
|
||||||
tileCoord[2]
|
features: data ? data.features : [],
|
||||||
);
|
},
|
||||||
const geojson = JSON.stringify(
|
replacer
|
||||||
{
|
);
|
||||||
type: 'FeatureCollection',
|
defaultTileLoadFunction(
|
||||||
features: data ? data.features : [],
|
tile,
|
||||||
},
|
'data:application/json;charset=UTF-8,' + geojson
|
||||||
replacer
|
);
|
||||||
);
|
});
|
||||||
defaultTileLoadFunction(
|
|
||||||
tile,
|
|
||||||
'data:application/json;charset=UTF-8,' + geojson
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
const vectorLayer = new VectorTileLayer({
|
const vectorLayer = new VectorTileLayer({
|
||||||
source: vectorSource,
|
source: vectorSource,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user