PHP 7.4.33
Preview: InfoBox.md Size: 873 B
/var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/@react-google-maps/api/src/components/addons/InfoBox.md
# InfoBox example

```jsx
const { GoogleMap, LoadScript, InfoBox } = require("../../");
const ScriptLoaded = require("../../docs/ScriptLoaded").default;

const mapContainerStyle = {
  height: "400px",
  width: "800px"
};

const center = {
  lat: 33.772,
  lng: -117.214
};

const options = { closeBoxURL: '', enableEventPropagation: true };

const onLoad = infoBox => {
  console.log('infoBox: ', infoBox)
};

<ScriptLoaded>
  <GoogleMap
    id="InfoBox-example"
    mapContainerStyle={mapContainerStyle}
    zoom={10}
    center={center}
  >
    <InfoBox
      onLoad={onLoad}
      options={options}
      position={center}
    >
      <div style={{ backgroundColor: 'yellow', opacity: 0.75, padding: 12 }}>
        <div style={{ fontSize: 16, fontColor: `#08233B` }}>
          Hello, World!
        </div>
      </div>
    </InfoBox>
  </GoogleMap>
</ScriptLoaded>
```

Directory Contents

Dirs: 0 × Files: 8
Name Size Perms Modified Actions
3.29 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
1.78 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
873 B lrw-r--r-- 2026-04-28 09:11:40
Edit Download
12.70 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
2.09 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
4.23 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
19.01 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
4.29 KB lrw-r--r-- 2026-04-28 09:11:40
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).