what is the difference between containerStyle and Style in <Map> of google-maps-react API

587 Views Asked by At

Hi I am using this google-maps-react API.

From the documentation, under tag, there is Style and ContainerStyle properties. Could anyone explain

  1. what is the difference between these two; and
  2. when do i use either one of it

Extract from documentation Style: Takes CSS style object - commonly width and height. Container Style: Takes CSS style object - optional, commonly when you want to change from the default of position "absolute".

1

There are 1 best solutions below

2
dinesh oz On

As from documenatation, It's just an attribute to change the position.

Container Style: Takes CSS style object - optional, commonly when you want to change from the default of position "absolute".

Style is to change the other properties related to map.