Skip to content

Commit

Permalink
Merge pull request #47 from concord-consortium/186924285-active-stati…
Browse files Browse the repository at this point in the history
…ons-legend

Adds isActive legend on map
  • Loading branch information
lublagg authored Feb 1, 2024
2 parents fdd6e44 + 1833ead commit 37523e0
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 37523e0

Please sign in to comment.