import React, {FunctionComponent} from 'react';
import {APIProvider, Map, Marker} from '@vis.gl/react-google-maps';
const App: FunctionComponent<Record<string, unknown>> = () => (
<APIProvider apiKey={'Your API key here'}>
<Map zoom={12} center={{lat: 53.54992, lng: 10.00678}}>
<Marker position={{lat: 53.54992, lng: 10.00678}} />
</Map>
</APIProvider>
);
export default App;
The MarkerProps interface extends the google.maps.MarkerOptions interface and includes all possible options available for a Maps JavaScript API Marker. Additionally, it is possible to add different event listeners, e.g. the click event with the onClick
property.
To see a Marker on the Map, the position
property needs to be set.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4