Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/components/layers/SourcesLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down Expand Up @@ -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,
});
}),
Expand All @@ -97,7 +100,7 @@ export function SourcesLayer({

sourceGroupRef.current = group;
map.addLayer(group);
}, [sourceLists, activeSourceListIds]);
}, [sourceLists, activeSourceListIds, flipped]);

// Set up interaction and popup
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/configs/mapSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down