Closed kravchenko2805 closed 8 months ago
There is a workaround for this:
inside onGoogleApiLoaded
event:
transitLayer.current = new maps.TransitLayer()
And trigger: on - transitLayer.current.setMap(map) off - transitLayer.current.setMap(null)
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Describe the feature you'd like to request
There was prop on MapComponent to control layers that could take array of strings like:
layerTypes={publicTransport ? ['TransitLayer'] : []}
in this case to show transit layer that could be controlled in
options.styles
object by specifyingfeatureType
I have tried
maps.TransitLayer();
atonGoogleApiLoaded
event but it didn't workDescribe the solution you'd like
To have ability to control appearance of transit layer through GoogleMap props
Describe alternatives you've considered
To control appearance of transit layer through
Map
orGoogleApi
instances atonGoogleApiLoaded
event or through handlers