Skip to content

Commit

Permalink
Adds isActive legend on map
Browse files Browse the repository at this point in the history
  • Loading branch information
eireland committed Jan 31, 2024
1 parent ebf636a commit 1833ead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/use-codap-api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import { useStateContext } from "./use-state";
import { Attribute, Collection, DataContext, ICODAPItem, IDataType, IItem } from "../types";
import { IResult, codapInterface, createItems, getAllItems, getDataContext } from "@concord-consortium/codap-plugin-api";
import { DSCollection1, DSCollection2, DSName, kStationsCollectionName } from "../constants";
import { DSCollection1, DSCollection2, DSName, kStationsDatasetName } from "../constants";
import { clearData, createMap, selectStations } from "../utils/codapHelpers";
import { dataTypeStore } from "../utils/noaaDataTypes";

Expand All @@ -15,7 +15,7 @@ export const useCODAPApi = () => {
useEffect(() => {
if (weatherStation && isMapOpen) {
const zoom = zoomMap ? 7 : null;
createMap(kStationsCollectionName, {width: 500, height: 350}, [weatherStation.latitude, weatherStation.longitude], zoom);
createMap(kStationsDatasetName, {width: 500, height: 350}, [weatherStation.latitude, weatherStation.longitude], zoom);
selectStations([weatherStation.name]);
}
}, [isMapOpen, weatherStation, zoomMap]);
Expand Down

0 comments on commit 1833ead

Please sign in to comment.