BLUE
PHP 7.4.33
Path:
/var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/@react-google-maps/api/src/docs
Run
Logout
Edit File
Size: 1.62 KB
Close
/var/www/sitesecurity.bitkit.dk/httpdocs/node_modules/@react-google-maps/api/src/docs/getting-started.md
Text
Base64
# Install @react-google-maps/api ```bash npm install --save @react-google-maps/api # or pnpm install @react-google-maps/api ``` ## LoadScript and GoogleMap The two basic components required to load a simple map are: - LoadScript - Loads the Google Maps API script - GoogleMap - The map component inside which all other components render The simplest way to get a functional map is: > ⚠️ Make sure you cache the props passed to `GoogleMap` to avoid re-renders that may harm the performance. ```md import React, { Component } from 'react'; import { GoogleMap, LoadScript } from '@react-google-maps/api'; const containerStyle = { width: '400px', height: '400px' }; const center = { lat: -3.745, lng: -38.523 }; class MyComponents extends Component { render() { return ( <LoadScript googleMapsApiKey="YOUR_API_KEY" > <GoogleMap mapContainerStyle={containerStyle} center={center} zoom={10} > { /_ Child components, such as markers, info windows, etc. _/ } <></> </GoogleMap> </LoadScript> ) } } ``` Or you can also adopt a functional component style: ```md import React from 'react' import { GoogleMap, LoadScript } from '@react-google-maps/api'; const containerStyle = { width: '400px', height: '400px' }; const center = { lat: -3.745, lng: -38.523 }; function MyComponent() { return ( <LoadScript googleMapsApiKey="YOUR_API_KEY" > <GoogleMap mapContainerStyle={containerStyle} center={center} zoom={10} > { /_ Child components, such as markers, info windows, etc. _/ } <></> </GoogleMap> </LoadScript> ) } export default React.memo(MyComponent) ```
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
docs-api-key.ts
365 B
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DocsApiKeyInput.tsx
2.16 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
favicon.ico
15.04 KB
lrw-r--r--
2026-04-28 09:11:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
getting-started.md
1.62 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
introduction.md
1.46 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ScriptLoaded.tsx
1.37 KB
lrw-r--r--
2026-04-28 09:11:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).