react-google-maps icon indicating copy to clipboard operation
react-google-maps copied to clipboard

Cannot rotate ground overlay in React Google Maps - property “bearing ” is ignored

Open carlosedof opened this issue 3 years ago • 0 comments

I need to place a image with fixed bounds but it has a rotation, because its like a blueprint of a building. To achieve this, I am using GroundOverlay. My problem is, when I set a property option with bearing property, this property is ignored. It does not rotate.

This is where I found bearing property. https://developers.google.com/android/reference/com/google/android/gms/maps/model/GroundOverlayOptions#bearing(float)

Here is my code:

<LoadScript googleMapsApiKey="API-KEY">
        <GoogleMap mapContainerStyle={containerStyle} center={center} zoom={18}>
            <GroundOverlay
              key={"url"}
              url={planta}
              options={{ bearing: 30 }}
              bounds={{
                north,
                south,
                east,
                west,
              }}
            />
        </GoogleMap>
</LoadScript>

If anyone know how can I rotate that image, will be appreciated. I need a solution that could be dynamic and not for that specific image, cause the idea is to render it from backend with the property bearing.

Thank you!!

carlosedof avatar Aug 26 '20 18:08 carlosedof