Removing code that had been commented out.

This commit is contained in:
vdv committed 2023-01-20 21:20:41 +01:00
1 parent 9ade878deb
commit 81ffb65aaf
2 files changed
+3 -44

No files matched your search

+2 -34
View File
@@ -10,11 +10,7 @@ import Attribution from 'ol/control/Attribution';
import Rotate from 'ol/control/Rotate';
import ScaleLine from 'ol/control/ScaleLine';
import Control from 'ol/control/Control';
import {
fromLonLat,
toLonLat,
useGeographic as olUseGeographic,
} from 'ol/proj';
import { fromLonLat, toLonLat } from 'ol/proj';
import DragRotate from 'ol/interaction/DragRotate';
import 'ol/ol.css';
@@ -307,15 +303,7 @@ const Map: Component = () => {
// feature,
// });
if (feature.get('sub-type') === 'tourism') {
return new Point(
olExtent.getCenter(feature.getGeometry().getExtent())
);
// return new Point(
// toLonLat(
// olExtent.getCenter(feature.getGeometry().getExtent()),
// olMap.getView().getProjection()
// )
// );
return feature.getGeometry();
}
return null;
},
@@ -327,12 +315,6 @@ const Map: Component = () => {
// });
return new Feature({
// geometry: new Point(
// toLonLat(
// olExtent.getCenter(point.getExtent()),
// olMap.getView().getProjection()
// )
// ),
geometry: point,
features: features,
type: 'cluster',
@@ -362,20 +344,6 @@ const Map: Component = () => {
olMap.addLayer(clusterLayer);
setMap(olMap);
// console.log({
// caller: 'Map / projections',
// olMap,
// projections: {
// map: olMap.getView().getProjection(),
// vectorSource: vectorLayer.getSource()?.getProjection(),
// clusterSource: clusterLayer.getSource().getProjection(),
// clusterSourceSource: clusterLayer
// .getSource()
// ?.getSource()
// .getProjection(),
// },
// });
});
return (
+1 -10
View File
@@ -1,5 +1,4 @@
import { equals, Extent } from 'ol/extent';
import { fromLonLat, Projection } from 'ol/proj';
import VectorTileSource from 'ol/source/VectorTile.js';
interface Options {
@@ -9,23 +8,15 @@ interface Options {
class ClusterableVectorTileSourceProxy {
extent?: Extent;
resolution?: number;
// extentProjected?: Extent;
featuresSent: boolean = false;
proxy?: typeof Proxy;
overloads = {
loadFeatures: (target: VectorTileSource) => {
return (extent: Extent, resolution: number, projection: Projection) => {
return (extent: Extent, resolution: number) => {
this.resolution = resolution;
if (this.extent === undefined || !equals(this.extent, extent)) {
this.extent = extent;
// const projection = target.getProjection();
// if (projection != null) {
// this.extentProjected = fromLonLat(
// extent.slice(0, 2),
// projection
// ).concat(fromLonLat(extent.slice(2), this.projection));
// }
}
if (!this.featuresSent) {
target.dispatchEvent('change');