-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMap.js
More file actions
48 lines (43 loc) · 1.17 KB
/
Map.js
File metadata and controls
48 lines (43 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React from "react";
import GoogleMapReact from 'google-map-react';
const AnyReactComponent = ({ text }) => <div style={{color:"white"}}>{<span class="material-symbols-outlined">
location_on
</span>}</div>;
// const renderMarkers = (map, maps) => {
// let marker = new maps.Marker({
// position: { lat: , lng: longitude },
// map,
// title: 'Hello World!'
// });
// return marker;
// };
export default function SimpleMap(){
const defaultProps = {
center: {
lat: 18.520430,
lng: 73.856743
},
zoom: 11
};
return (
// Important! Always set the container height explicitly
<div style={{ height: '70vh', width: '90%' ,margin:'auto',marginTop:'20px',marginLeft:'9%'}}>
<GoogleMapReact
bootstrapURLKeys={{ key: "AIzaSyDU9IGeyJo-DROGOjTubF6NU9pGlIIHdRc" }}
defaultCenter={defaultProps.center}
defaultZoom={defaultProps.zoom}
>
<AnyReactComponent
lat={18.499380}
lng={73.822968}
text="📌"
/>
<AnyReactComponent
lat={18.579306}
lng={73.982346}
text="📌"
/>
</GoogleMapReact>
</div>
);
}