diff --git a/packages/chart/src/index.jsx b/packages/chart/src/index.jsx index 3dff79722..53e2ed76c 100644 --- a/packages/chart/src/index.jsx +++ b/packages/chart/src/index.jsx @@ -4,6 +4,7 @@ import ReactDOM from 'react-dom/client' import CdcChart from './CdcChartWrapper' import './coreStyles_chart.scss' +import '@cdc/core/styles/cove-main.scss' import 'react-tooltip/dist/react-tooltip.css' let isEditor = window.location.href.includes('editor=true') diff --git a/packages/dashboard/src/components/Column.tsx b/packages/dashboard/src/components/Column.tsx index 6bf70c5e5..9167b7cf5 100644 --- a/packages/dashboard/src/components/Column.tsx +++ b/packages/dashboard/src/components/Column.tsx @@ -40,7 +40,7 @@ const Column = ({ data, rowIdx, colIdx }) => { const handleTitle = config => { if (!config) return if (config.type === 'map') return config.general.title - if (config.type === 'markup-include') return config.contentEditor.title + if (config.type === 'markup-include') return config.contentEditor?.title return config.title } diff --git a/packages/dashboard/src/index.tsx b/packages/dashboard/src/index.tsx index b0e8fec25..cfcff4eee 100644 --- a/packages/dashboard/src/index.tsx +++ b/packages/dashboard/src/index.tsx @@ -2,6 +2,7 @@ import React from 'react' import ReactDOM from 'react-dom/client' import MultiDashboardWrapper from './CdcDashboard' +import '@cdc/core/styles/cove-main.scss' import './coreStyles_dashboard.scss' let isEditor = window.location.href.includes('editor=true') diff --git a/packages/data-bite/src/index.jsx b/packages/data-bite/src/index.jsx index d95c32e07..1a0537390 100644 --- a/packages/data-bite/src/index.jsx +++ b/packages/data-bite/src/index.jsx @@ -2,6 +2,7 @@ import React from 'react' import ReactDOM from 'react-dom/client' import CdcDataBite from './CdcDataBite' +import '@cdc/core/styles/cove-main.scss' import './coreStyles_databite.scss' let isEditor = window.location.href.includes('editor=true') diff --git a/packages/editor/src/index.jsx b/packages/editor/src/index.jsx index 6cc98d97e..c89009103 100644 --- a/packages/editor/src/index.jsx +++ b/packages/editor/src/index.jsx @@ -2,6 +2,7 @@ import React from 'react' import ReactDOM from 'react-dom/client' import CdcEditor from './CdcEditor' +import '@cdc/core/styles/cove-main.scss' import './coreStyles_editor.scss' // Allow URL query to preselect a tab in standalone mode diff --git a/packages/editor/src/samples/valid-geo-point.csv b/packages/editor/src/samples/valid-geo-point.csv index 4111847cf..665b6849c 100644 --- a/packages/editor/src/samples/valid-geo-point.csv +++ b/packages/editor/src/samples/valid-geo-point.csv @@ -81,7 +81,7 @@ Plano,-96.698883,33.019844,79 Portland,-122.658722,45.51223,80 Raleigh,-78.638176,35.779591,81 Reno,-119.813805,39.529633,82 -Richmond,-77.43605,37.540726,83 +"Richmond, Virginia",-77.43605,37.540726,83 Riverside,-117.375496,33.980602,84 Sacramento,-121.4944,38.581573,85 Saint Paul,-93.089958,44.953705,86 diff --git a/packages/filtered-text/src/index.jsx b/packages/filtered-text/src/index.jsx index 3085845eb..8d7027416 100644 --- a/packages/filtered-text/src/index.jsx +++ b/packages/filtered-text/src/index.jsx @@ -2,6 +2,7 @@ import React from 'react' import ReactDOM from 'react-dom/client' import CdcFilteredText from './CdcFilteredText' +import '@cdc/core/styles/cove-main.scss' import './coreStyles_filteredtext.scss' //@ts-ignore diff --git a/packages/map/examples/default-geocode.json b/packages/map/examples/default-geocode.json index 15614cafc..479246a5c 100644 --- a/packages/map/examples/default-geocode.json +++ b/packages/map/examples/default-geocode.json @@ -651,7 +651,7 @@ "Value": 82 }, { - "City": "Richmond", + "City": "Richmond, Virginia", "Longitude": "-77.43605", "Latitude": "37.540726", "Value": 83 @@ -811,4 +811,4 @@ "fullBorder": false, "validated": 4.23, "version": "4.24.11" -} \ No newline at end of file +} diff --git a/packages/map/package.json b/packages/map/package.json index defbf833c..b2ac13efb 100644 --- a/packages/map/package.json +++ b/packages/map/package.json @@ -28,7 +28,9 @@ "@cdc/core": "^4.24.11", "@emotion/core": "^10.0.28", "@emotion/react": "^11.1.5", + "@googlemaps/markerclusterer": "^2.5.3", "@hello-pangea/dnd": "^16.2.0", + "@react-google-maps/api": "^2.20.3", "@visx/geo": "^1.13.0", "chroma": "0.0.1", "chroma-js": "^2.1.0", @@ -38,9 +40,12 @@ "d3-zoom": "^3.0.0", "html-react-parser": "^3.0.8", "html2canvas": "^1.0.0-rc.7", + "leaflet": "^1.9.4", "lodash.debounce": "^4.0.8", "papaparse": "^5.3.0", "react-accessible-accordion": "^3.0.1", + "react-leaflet": "^4.2.1", + "react-leaflet-markercluster": "^4.1.1", "react-table": "^7.5.0", "react-tag-autocomplete": "^6.0.0", "react-tooltip": "5.8.2-beta.3", diff --git a/packages/map/src/CdcMap.tsx b/packages/map/src/CdcMap.tsx index 53026936c..117746da8 100644 --- a/packages/map/src/CdcMap.tsx +++ b/packages/map/src/CdcMap.tsx @@ -75,8 +75,9 @@ import Modal from './components/Modal' import NavigationMenu from './components/NavigationMenu' import UsaMap from './components/UsaMap' import WorldMap from './components/WorldMap' +import GoogleMap from './components/GoogleMap' -// Hooks +// hooks import useTooltip from './hooks/useTooltip' import useResizeObserver from './hooks/useResizeObserver' @@ -1559,6 +1560,7 @@ const CdcMap = ({ {'us-county' === geoType && } {'world' === geoType && } {/* logo is handled in UsaMap.State when applicable */} + {'google-map' === geoType && } {'data' === general.type && logo && ('us' !== geoType || 'us-geocode' === state.general.type) && ( )} diff --git a/packages/map/src/_stories/GoogleMap.stories.tsx b/packages/map/src/_stories/GoogleMap.stories.tsx new file mode 100644 index 000000000..266dba8ec --- /dev/null +++ b/packages/map/src/_stories/GoogleMap.stories.tsx @@ -0,0 +1,19 @@ +import type { Meta, StoryObj } from '@storybook/react' +import CdcMap from '../CdcMap' +import googleMapConfig from './_mock/google-map.json' +import { editConfigKeys } from '@cdc/chart/src/helpers/configHelpers' + +const meta: Meta = { + title: 'Components/Templates/Map', + component: CdcMap +} + +type Story = StoryObj + +export const Google_Map: Story = { + args: { + config: googleMapConfig + } +} + +export default meta diff --git a/packages/map/src/_stories/_mock/google-map.json b/packages/map/src/_stories/_mock/google-map.json new file mode 100644 index 000000000..dc3cc1eea --- /dev/null +++ b/packages/map/src/_stories/_mock/google-map.json @@ -0,0 +1,819 @@ +{ + "annotations": [], + "general": { + "title": "Example Data Map with Cities", + "subtext": "*: Lorem ipsum; NA: Lorem ipsum.", + "type": "data", + "geoType": "google-map", + "headerColor": "theme-cyan", + "showSidebar": true, + "showTitle": true, + "showDownloadButton": true, + "expandDataTable": false, + "backgroundColor": "#f5f5f5", + "geoBorderColor": "darkGray", + "territoriesLabel": "Territories", + "language": "en", + "hasRegions": false, + "showDownloadMediaButton": false, + "displayAsHex": false, + "displayStateLabels": false, + "fullBorder": false, + "palette": { + "isReversed": false + }, + "allowMapZoom": true, + "hideGeoColumnInTooltip": false, + "hidePrimaryColumnInTooltip": false, + "statePicked": { + "fipsCode": "01", + "stateName": "Alabama" + }, + "showDownloadImgButton": false, + "showDownloadPdfButton": false, + "territoriesAlwaysShow": false, + "geoLabelOverride": "", + "convertFipsCodes": true, + "noStateFoundMessage": "Map Unavailable", + "annotationDropdownText": "Annotations" + }, + "type": "map", + "color": "yelloworangered", + "columns": { + "latitude": { + "name": "Latitude" + }, + "longitude": { + "name": "Longitude" + }, + "geo": { + "dataTable": true, + "label": "", + "name": "City", + "tooltip": false + }, + "primary": { + "dataTable": true, + "label": "Rate", + "name": "Value", + "prefix": "", + "suffix": "", + "tooltip": false, + "roundToPlace": 0 + }, + "navigate": { + "dataTable": false, + "name": "", + "tooltip": false + }, + "additionalColumn1": { + "label": "Latitude", + "dataTable": true, + "tooltips": false, + "prefix": "", + "suffix": "", + "name": "Latitude", + "tooltip": true + }, + "geosInRegion": { + "name": "Longitude", + "dataTable": true, + "label": "Longitude" + } + }, + "legend": { + "numberOfItems": 3, + "position": "side", + "title": "Legend Title", + "description": "Legend Text", + "type": "equalnumber", + "specialClasses": [], + "unified": false, + "singleColumn": false, + "dynamicDescription": false, + "descriptions": {}, + "singleRow": false, + "showSpecialClassesLast": false, + "verticalSorted": false, + "style": "circles", + "subStyle": "linear blocks", + "tickRotation": "", + "singleColumnLegend": false, + "hideBorder": false + }, + "filters": [], + "table": { + "showDownloadUrl": false, + "showDataTableLink": true, + "wrapColumns": false, + "label": "Data Table", + "expanded": true, + "limitHeight": false, + "height": "", + "caption": "", + "showFullGeoNameInCSV": false, + "forceDisplay": true, + "download": true, + "indexLabel": "", + "showDownloadLinkBelow": true + }, + "tooltips": { + "appearanceType": "hover", + "linkLabel": "Learn More", + "capitalizeLabels": true, + "opacity": 90 + }, + "runtime": { + "editorErrorMessage": [] + }, + "visual": { + "cityStyle": "pin", + "minBubbleSize": 1, + "maxBubbleSize": 20, + "extraBubbleBorder": false, + "showBubbleZeros": false, + "geoCodeCircleSize": 2, + "cityStyleLabel": "", + "additionalCityStyles": [] + }, + "mapPosition": { + "coordinates": [ + 0, + 30 + ], + "zoom": 1 + }, + "map": { + "layers": [], + "patterns": [] + }, + "hexMap": { + "type": "", + "shapeGroups": [ + { + "legendTitle": "", + "legendDescription": "", + "items": [ + { + "key": "", + "shape": "Arrow Up", + "column": "", + "operator": "=", + "value": "" + } + ] + } + ] + }, + "filterBehavior": "Filter Change", + "dataTable": { + "title": "Data Table", + "forceDisplay": true + }, + "sharing": { + "enabled": false, + "dataHost": "wcms-wp.cdc.gov", + "configUrl": "/wcms/4.0/cdc-wp/data-presentation/examples/city-data-map-example.json" + }, + "usingWidgetLoader": true, + "data": [ + { + "City": "Albuquerque", + "Longitude": "-106.650421", + "Latitude": "35.084385", + "Value": 1 + }, + { + "City": "Anaheim", + "Longitude": "-117.914299", + "Latitude": "33.836594", + "Value": 2 + }, + { + "City": "Anchorage", + "Longitude": "-149.900284", + "Latitude": "61.218056", + "Value": 3 + }, + { + "City": "Arlington", + "Longitude": "-97.108063", + "Latitude": "32.735687", + "Value": 4 + }, + { + "City": "Atlanta", + "Longitude": "-84.387985", + "Latitude": "33.748997", + "Value": 5 + }, + { + "City": "Aurora", + "Longitude": "-93.717979", + "Latitude": "36.97089", + "Value": 6 + }, + { + "City": "Austin", + "Longitude": "-97.743057", + "Latitude": "30.267153", + "Value": 7 + }, + { + "City": "Bakersfield", + "Longitude": "-119.018715", + "Latitude": "35.373291", + "Value": 8 + }, + { + "City": "Baltimore", + "Longitude": "-76.61219", + "Latitude": "39.290386", + "Value": 9 + }, + { + "City": "Baton Rouge", + "Longitude": "-91.187149", + "Latitude": "30.451468", + "Value": 10 + }, + { + "City": "Boise", + "Longitude": "-116.202316", + "Latitude": "43.615021", + "Value": 11 + }, + { + "City": "Boston", + "Longitude": "-71.058884", + "Latitude": "42.360081", + "Value": 12 + }, + { + "City": "Buffalo", + "Longitude": "-78.878372", + "Latitude": "42.886448", + "Value": 13 + }, + { + "City": "Chandler", + "Longitude": "-111.841248", + "Latitude": "33.30616", + "Value": 14 + }, + { + "City": "Charlotte", + "Longitude": "-80.843124", + "Latitude": "35.227085", + "Value": 15 + }, + { + "City": "Chesapeake", + "Longitude": "-76.287491", + "Latitude": "36.768208", + "Value": 16 + }, + { + "City": "Chicago", + "Longitude": "-87.629799", + "Latitude": "41.878113", + "Value": 17 + }, + { + "City": "Chula Vista", + "Longitude": "-117.084198", + "Latitude": "32.640053", + "Value": 18 + }, + { + "City": "Cincinnati", + "Longitude": "-84.512016", + "Latitude": "39.103119", + "Value": 19 + }, + { + "City": "Cleveland", + "Longitude": "-81.694359", + "Latitude": "41.499321", + "Value": 20 + }, + { + "City": "Colorado Springs", + "Longitude": "-104.821365", + "Latitude": "38.833881", + "Value": 21 + }, + { + "City": "Columbus", + "Longitude": "-82.998795", + "Latitude": "39.961178", + "Value": 22 + }, + { + "City": "Corpus Christi", + "Longitude": "-97.396378", + "Latitude": "27.800583", + "Value": 23 + }, + { + "City": "Dallas", + "Longitude": "-96.796989", + "Latitude": "32.776665", + "Value": 24 + }, + { + "City": "Denver", + "Longitude": "-104.99025", + "Latitude": "39.739235", + "Value": 25 + }, + { + "City": "Detroit", + "Longitude": "-83.045753", + "Latitude": "42.331429", + "Value": 26 + }, + { + "City": "District of Columbia", + "Longitude": "-77.036873", + "Latitude": "38.907192", + "Value": 27 + }, + { + "City": "Durham", + "Longitude": "-78.898621", + "Latitude": "35.994034", + "Value": 28 + }, + { + "City": "El Paso", + "Longitude": "-106.485023", + "Latitude": "31.761877", + "Value": 29 + }, + { + "City": "Fort Wayne", + "Longitude": "-85.139351", + "Latitude": "41.079273", + "Value": 30 + }, + { + "City": "Ft Wayne", + "Longitude": "-85.139351", + "Latitude": "41.079273", + "Value": 31 + }, + { + "City": "Fort Worth", + "Longitude": "-97.330765", + "Latitude": "32.755489", + "Value": 32 + }, + { + "City": "Fremont", + "Longitude": "-121.988571", + "Latitude": "37.548271", + "Value": 33 + }, + { + "City": "Fresno", + "Longitude": "-119.787125", + "Latitude": "36.737797", + "Value": 34 + }, + { + "City": "Garland", + "Longitude": "-96.638885", + "Latitude": "32.912624", + "Value": 35 + }, + { + "City": "Gilbert", + "Longitude": "-111.789024", + "Latitude": "33.352825", + "Value": 36 + }, + { + "City": "Glendale", + "Longitude": "-118.255074", + "Latitude": "34.142509", + "Value": 37 + }, + { + "City": "Greensboro", + "Longitude": "-79.791977", + "Latitude": "36.072636", + "Value": 38 + }, + { + "City": "Henderson", + "Longitude": "-114.98172", + "Latitude": "36.039524", + "Value": 39 + }, + { + "City": "Hialeah", + "Longitude": "-80.278107", + "Latitude": "25.857595", + "Value": 40 + }, + { + "City": "Honolulu", + "Longitude": "-157.858337", + "Latitude": "21.306944", + "Value": 41 + }, + { + "City": "Houston", + "Longitude": "-95.358421", + "Latitude": "29.749907", + "Value": 42 + }, + { + "City": "Indianapolis", + "Longitude": "-86.158066", + "Latitude": "39.768402", + "Value": 43 + }, + { + "City": "Irvine", + "Longitude": "-117.826508", + "Latitude": "33.684566", + "Value": 44 + }, + { + "City": "Irving", + "Longitude": "-96.948891", + "Latitude": "32.814018", + "Value": 45 + }, + { + "City": "Jacksonville", + "Longitude": "-81.655647", + "Latitude": "30.332184", + "Value": 46 + }, + { + "City": "Jersey City", + "Longitude": "-74.077644", + "Latitude": "40.728157", + "Value": 47 + }, + { + "City": "Kansas City", + "Longitude": "-94.578568", + "Latitude": "39.099728", + "Value": 48 + }, + { + "City": "Laredo", + "Longitude": "-99.507553", + "Latitude": "27.503561", + "Value": 49 + }, + { + "City": "Las Vegas", + "Longitude": "-115.139832", + "Latitude": "36.169941", + "Value": 50 + }, + { + "City": "Lexington", + "Longitude": "-84.503716", + "Latitude": "38.040585", + "Value": 51 + }, + { + "City": "Lincoln", + "Longitude": "-95.262955", + "Latitude": "37.346134", + "Value": 52 + }, + { + "City": "Long Beach", + "Longitude": "-118.193741", + "Latitude": "33.77005", + "Value": 53 + }, + { + "City": "Los Angeles", + "Longitude": "-118.243683", + "Latitude": "34.052235", + "Value": 54 + }, + { + "City": "Los Angeles County", + "Longitude": "-118.229362", + "Latitude": "34.058762", + "Value": 55 + }, + { + "City": "Louisville", + "Longitude": "-85.758453", + "Latitude": "38.252666", + "Value": 56 + }, + { + "City": "Lubbock", + "Longitude": "-101.855164", + "Latitude": "33.577862", + "Value": 57 + }, + { + "City": "38", + "Longitude": "-89.40123", + "Latitude": "43.073051", + "Value": 58 + }, + { + "City": "Marion County, Indiana", + "Longitude": "-86.136543", + "Latitude": "39.781029", + "Value": 59 + }, + { + "City": "Memphis", + "Longitude": "-90.048981", + "Latitude": "35.149532", + "Value": 60 + }, + { + "City": "Mesa", + "Longitude": "-111.831474", + "Latitude": "33.415184", + "Value": 61 + }, + { + "City": "Miami", + "Longitude": "-80.191788", + "Latitude": "25.761681", + "Value": 62 + }, + { + "City": "Milwaukee", + "Longitude": "-87.906471", + "Latitude": "43.038902", + "Value": 63 + }, + { + "City": "Minneapolis", + "Longitude": "-93.265015", + "Latitude": "44.977753", + "Value": 64 + }, + { + "City": "Montgomery County, Maryland", + "Longitude": "-77.199406", + "Latitude": "39.153515", + "Value": 65 + }, + { + "City": "Nashville", + "Longitude": "-86.781601", + "Latitude": "36.162663", + "Value": 66 + }, + { + "City": "New Orleans", + "Longitude": "-90.071533", + "Latitude": "29.951065", + "Value": 67 + }, + { + "City": "New York City", + "Longitude": "-74.005974", + "Latitude": "40.712776", + "Value": 68 + }, + { + "City": "Newark", + "Longitude": "-95.582733", + "Latitude": "37.443188", + "Value": 69 + }, + { + "City": "Norfolk", + "Longitude": "-76.285873", + "Latitude": "36.850769", + "Value": 70 + }, + { + "City": "North Las Vegas", + "Longitude": "-115.114571", + "Latitude": "36.19585", + "Value": 71 + }, + { + "City": "Oakland", + "Longitude": "-122.271111", + "Latitude": "37.804363", + "Value": 72 + }, + { + "City": "Oklahoma City", + "Longitude": "-97.516426", + "Latitude": "35.46756", + "Value": 73 + }, + { + "City": "Omaha", + "Longitude": "-95.934502", + "Latitude": "41.256538", + "Value": 74 + }, + { + "City": "Orlando", + "Longitude": "-81.379234", + "Latitude": "28.538336", + "Value": 75 + }, + { + "City": "Philadelphia", + "Longitude": "-75.165222", + "Latitude": "39.952583", + "Value": 76 + }, + { + "City": "Phoenix", + "Longitude": "-112.074036", + "Latitude": "33.448376", + "Value": 77 + }, + { + "City": "Pittsburgh", + "Longitude": "-79.995888", + "Latitude": "40.440624", + "Value": 78 + }, + { + "City": "Plano", + "Longitude": "-96.698883", + "Latitude": "33.019844", + "Value": 79 + }, + { + "City": "Portland", + "Longitude": "-122.658722", + "Latitude": "45.51223", + "Value": 80 + }, + { + "City": "Raleigh", + "Longitude": "-78.638176", + "Latitude": "35.779591", + "Value": 81 + }, + { + "City": "Reno", + "Longitude": "-119.813805", + "Latitude": "39.529633", + "Value": 82 + }, + { + "City": "Richmond", + "Longitude": "-77.43605", + "Latitude": "37.540726", + "Value": 83 + }, + { + "City": "Riverside", + "Longitude": "-117.375496", + "Latitude": "33.980602", + "Value": 84 + }, + { + "City": "Sacramento", + "Longitude": "-121.4944", + "Latitude": "38.581573", + "Value": 85 + }, + { + "City": "Saint Paul", + "Longitude": "-93.089958", + "Latitude": "44.953705", + "Value": 86 + }, + { + "City": "San Antonio", + "Longitude": "-98.493629", + "Latitude": "29.424122", + "Value": 87 + }, + { + "City": "San Diego", + "Longitude": "-117.161087", + "Latitude": "32.715736", + "Value": 88 + }, + { + "City": "San Francisco", + "Longitude": "-122.419418", + "Latitude": "37.774929", + "Value": 89 + }, + { + "City": "San Jose", + "Longitude": "-121.88633", + "Latitude": "37.338207", + "Value": 90 + }, + { + "City": "Santa Ana", + "Longitude": "-117.867653", + "Latitude": "33.745472", + "Value": 91 + }, + { + "City": "Scottsdale", + "Longitude": "-111.926048", + "Latitude": "33.494171", + "Value": 92 + }, + { + "City": "Seattle", + "Longitude": "-122.332069", + "Latitude": "47.606209", + "Value": 93 + }, + { + "City": "Spokane", + "Longitude": "-117.426048", + "Latitude": "47.658779", + "Value": 94 + }, + { + "City": "St. Louis", + "Longitude": "-90.199402", + "Latitude": "38.627003", + "Value": 95 + }, + { + "City": "St. Petersburg", + "Longitude": "-82.640289", + "Latitude": "27.767601", + "Value": 96 + }, + { + "City": "Stockton", + "Longitude": "-121.290779", + "Latitude": "37.957703", + "Value": 97 + }, + { + "City": "Tampa", + "Longitude": "-82.457176", + "Latitude": "27.950575", + "Value": 98 + }, + { + "City": "Toledo", + "Longitude": "-83.537865", + "Latitude": "41.652805", + "Value": 99 + }, + { + "City": "Tucson", + "Longitude": "-110.974709", + "Latitude": "32.222607", + "Value": 100 + }, + { + "City": "Tuscon", + "Longitude": "-110.974709", + "Latitude": "32.222607", + "Value": 101 + }, + { + "City": "Tulsa", + "Longitude": "-95.992775", + "Latitude": "36.15398", + "Value": 102 + }, + { + "City": "Virginia Beach", + "Longitude": "-75.977982", + "Latitude": "36.852924", + "Value": 103 + }, + { + "City": "Wichita", + "Longitude": "-97.330055", + "Latitude": "37.687176", + "Value": 104 + }, + { + "City": "Winston Salem", + "Longitude": "-80.244217", + "Latitude": "36.099861", + "Value": 105 + }, + { + "City": "Winston–Salem", + "Longitude": "-80.244217", + "Latitude": "36.099861", + "Value": 106 + } + ], + "filterStyle": "Filter Changes", + "version": "4.24.10" +} \ No newline at end of file diff --git a/packages/map/src/components/EditorPanel/components/EditorPanel.tsx b/packages/map/src/components/EditorPanel/components/EditorPanel.tsx index ccc6f6560..2a5a15912 100644 --- a/packages/map/src/components/EditorPanel/components/EditorPanel.tsx +++ b/packages/map/src/components/EditorPanel/components/EditorPanel.tsx @@ -44,6 +44,7 @@ import { MapContext } from '../../../types/MapContext.js' import { TextField } from './Inputs' import Alert from '@cdc/core/components/Alert' import { updateFieldFactory } from '@cdc/core/helpers/updateFieldFactory' +import { Select } from '@cdc/core/components/EditorPanel/Inputs' // Todo: move to useReducer, seperate files out. const EditorPanel = ({ columnsRequiredChecker }) => { @@ -724,6 +725,14 @@ const EditorPanel = ({ columnsRequiredChecker }) => { } }) break + case 'google-map': + setState({ + ...state, + general: { + ...state.general, + geoType: 'google-map' + } + }) default: break } @@ -1378,13 +1387,29 @@ const EditorPanel = ({ columnsRequiredChecker }) => { {/* Geography */} + {/**/} +