99 Typography ,
1010 Fab ,
1111} from '@mui/material' ;
12+ import OpenInNewIcon from '@mui/icons-material/OpenInNew' ;
1213import { Link } from 'react-router-dom' ;
1314import MapIcon from '@mui/icons-material/Map' ;
1415import TravelExploreIcon from '@mui/icons-material/TravelExplore' ;
@@ -34,6 +35,7 @@ import ModeOfTravelIcon from '@mui/icons-material/ModeOfTravel';
3435import { GtfsVisualizationMap } from './GtfsVisualizationMap' ;
3536import ZoomOutMapIcon from '@mui/icons-material/ZoomOutMap' ;
3637import { useRemoteConfig } from '../context/RemoteConfigProvider' ;
38+ import ReactGA from 'react-ga4' ;
3739
3840interface CoveredAreaMapProps {
3941 boundingBox ?: LatLngExpression [ ] ;
@@ -127,6 +129,14 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
127129 if ( newView !== null ) setView ( newView ) ;
128130 } ;
129131
132+ const handleOpenDetailedMapClick = ( ) : void => {
133+ ReactGA . event ( {
134+ category : 'engagement' ,
135+ action : 'gtfs_visualization_open_detailed_map' ,
136+ label : 'Open Detailed Map' ,
137+ } ) ;
138+ } ;
139+
130140 const getGbfsLatestVersionVisualizationUrl = (
131141 feed : GBFSFeedType ,
132142 ) : string | undefined => {
@@ -217,8 +227,15 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
217227 >
218228 { view === 'gtfsVisualizationView' &&
219229 config . enableGtfsVisualizationMap && (
220- < Button component = { Link } to = './map' >
221- Open Full Map with Filters
230+ < Button
231+ variant = 'contained'
232+ disableElevation
233+ component = { Link }
234+ to = './map'
235+ onClick = { handleOpenDetailedMapClick }
236+ endIcon = { < OpenInNewIcon > </ OpenInNewIcon > }
237+ >
238+ { t ( 'openDetailedMap' ) }
222239 </ Button >
223240 ) }
224241 { feed ?. data_type === 'gbfs' ? (
@@ -275,13 +292,15 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
275292 </ Tooltip >
276293 { config . enableGtfsVisualizationMap && (
277294 < Tooltip title = { t ( 'gtfsVisualizationTooltip' ) } >
278- < ToggleButton
279- value = 'gtfsVisualizationView'
280- disabled = { ! config . enableGtfsVisualizationMap }
281- aria-label = 'Bounding Box View'
282- >
283- < ModeOfTravelIcon />
284- </ ToggleButton >
295+ < span >
296+ < ToggleButton
297+ value = 'gtfsVisualizationView'
298+ disabled = { ! config . enableGtfsVisualizationMap }
299+ aria-label = 'Bounding Box View'
300+ >
301+ < ModeOfTravelIcon />
302+ </ ToggleButton >
303+ </ span >
285304 </ Tooltip >
286305 ) }
287306 </ ToggleButtonGroup >
0 commit comments