Finished navbar (responsive) and started to work
on filters sidebar
This commit is contained in:
@@ -10,9 +10,9 @@ class Main extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const uluru = {lat: -25.363, lng: 131.044};
|
||||
const uluru = {lat: 43.845031, lng: 18.4019262};
|
||||
const map = new google.maps.Map(this.refs.map, {
|
||||
zoom: 4,
|
||||
zoom: 13,
|
||||
center: uluru,
|
||||
streetViewControl: false,
|
||||
mapTypeControl: false
|
||||
@@ -27,6 +27,14 @@ class Main extends React.Component {
|
||||
control.innerHTML = '<button>Filters</button>';
|
||||
control.style = "top: 200px;"
|
||||
|
||||
var input = document.getElementById('gmaps-places-input');
|
||||
var options = {
|
||||
componentRestrictions: {country: "BA"}
|
||||
};
|
||||
var searchBox = new google.maps.places.Autocomplete(input, options);
|
||||
searchBox.addListener('places_changed', function() {
|
||||
console.log('search changed', searchBox.getPlaces());
|
||||
});
|
||||
control.addEventListener('click', (e) => {
|
||||
this.setState({
|
||||
mapClicked: true
|
||||
@@ -34,6 +42,7 @@ class Main extends React.Component {
|
||||
});
|
||||
control.index = 1;
|
||||
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(control);
|
||||
|
||||
}
|
||||
|
||||
onCloseClick(e) {
|
||||
@@ -57,7 +66,21 @@ class Main extends React.Component {
|
||||
return (
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
Kivi {this.state.mapClicked ? 'YEs': 'No'}
|
||||
<a className="hamburger-menu">K</a>
|
||||
<span className="title">Kiwi</span>
|
||||
<input
|
||||
id="gmaps-places-input"
|
||||
placeholder="Kuda?"
|
||||
className="where-to"
|
||||
type="text"></input>
|
||||
<div className="view-types">
|
||||
<a className="view-type-left">
|
||||
<i className="btn-select-map fa fa-list"></i>
|
||||
</a>
|
||||
<a className="view-type-right">
|
||||
<i className="view-type-map-icon fa fa-map-marker"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="right" style={rightStyle} className={rightClass}>
|
||||
|
||||
Reference in New Issue
Block a user