diff --git a/src/components/layers/SourcesLayer.tsx b/src/components/layers/SourcesLayer.tsx index e898959..cf084a3 100644 --- a/src/components/layers/SourcesLayer.tsx +++ b/src/components/layers/SourcesLayer.tsx @@ -8,7 +8,7 @@ import { Circle } from 'ol/geom'; import Select, { SelectEvent } from 'ol/interaction/Select.js'; import { click } from 'ol/events/condition'; import { MapProps } from '../OpenLayersMap'; -import { transformSources } from '../../utils/layerUtils'; +import { transformCoords, transformSources } from '../../utils/layerUtils'; type SourcesLayerProps = { sourceLists: MapProps['sourceLists']; @@ -73,9 +73,12 @@ export function SourcesLayer({ return new VectorLayer({ source: new VectorSource({ features: sl.sources.map((source) => { - const coords = [source.ra, source.dec]; + const originalCoords = [source.ra, source.dec]; + const syncedCoords = flipped + ? transformCoords(originalCoords, flipped, 'layer') + : originalCoords; return new Feature({ - geometry: new Circle(coords, 1), + geometry: new Circle(syncedCoords, 1 / 6), sourceData: source, }); }), @@ -97,7 +100,7 @@ export function SourcesLayer({ sourceGroupRef.current = group; map.addLayer(group); - }, [sourceLists, activeSourceListIds]); + }, [sourceLists, activeSourceListIds, flipped]); // Set up interaction and popup useEffect(() => { diff --git a/src/configs/mapSettings.ts b/src/configs/mapSettings.ts index 4113ef2..222402b 100644 --- a/src/configs/mapSettings.ts +++ b/src/configs/mapSettings.ts @@ -25,7 +25,7 @@ export const EXTERNAL_BASELAYERS: ExternalBaselayer[] = [ id: 'external-unwise-neo4', name: 'Legacy Survey | unWISE neo4', projection: 'EPSG:3857', - url: 'http://imagine.legacysurvey.org/static/tiles/unwise-neo4/1/{z}/{x}/{y}.jpg', + url: 'https://imagine.legacysurvey.org/static/tiles/unwise-neo4/1/{z}/{x}/{y}.jpg', extent: transformExtent( [-180, -MERCATOR_MAX_LAT, 180, MERCATOR_MAX_LAT], 'EPSG:4326',