-
Notifications
You must be signed in to change notification settings - Fork 1
/
overview-google-map.js
80 lines (72 loc) · 2.21 KB
/
overview-google-map.js
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
var React = require('react');
var GoogleMapLoader = require('react-google-maps').GoogleMapLoader;
var GoogleMap = require('react-google-maps').GoogleMap;
var Marker = require('react-google-maps').Marker;
var url = require("file?name=picture.png!./spanner1.png");
var Markers = {
markers:[{
position: {
lat: 51.529571,
lng: -0.042356
},
key: "1",
defaultAnimation: 2,
},{
position: {
lat: 51.533523,
lng: -0.287018
},
key: "2",
defaultAnimation: 2
},{
position: {
lat: 51.560851,
lng: -0.085144
},
key: "3",
defaultAnimation: 2
},{
position: {
lat: 51.467697,
lng: -0.064545
},
key: "4",
defaultAnimation: 2
},{
position: {
lat: 51.49079,
lng: 0.083771
},
key: "5",
defaultAnimation: 2
}],
canSubmit: false
}
var OverviewGoogleMap = React.createClass({
componentDidMount(){
},
render: function(){
return (
<div className="row main-padding margin-30 center-align">
<div className="component-title-box">
<h5>Available Jobs</h5>
</div>
<section style={{height: "25em"}}>
<GoogleMapLoader
containerElement={<div style={{height: "25em"}}></div>}
googleMapElement={
<GoogleMap ref={map => ("GoogleMap", map)} defaultZoom={11} options={{ scrollwheel: false}} defaultCenter={{lat:51.529571, lng: -0.042356}} >
{Markers.markers.map((marker, index) => {
return (
<Marker {...marker} options={{icon:url}} />
);
})}
</GoogleMap>
}
/>
</section>
</div>
);
}
})
module.exports = OverviewGoogleMap;