Skip to content

Commit de249f2

Browse files
committed
map size changed to fullscreen
1 parent 02b6413 commit de249f2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
66
<meta name="theme-color" content="#000000">
7-
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCIQgYcDxRD6DuhEljaMFRjwgJ73cjJIJk"
7+
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCIQgYcDxRD6DuhEljaMFRjwgJ73cjJIJk"
88
type="text/javascript"></script>
99
<!--
1010
manifest.json provides metadata used when your web app is added to the

src/App.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import React, { Component } from 'react';
2-
import { MapView } from './components/MapView';
1+
import React, { Component } from "react";
2+
import { MapView } from "./components/MapView";
33

44
class App extends Component {
55
render() {
66
return (
77
<MapView
88
isMarkerShown
99
googleMapURL="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry,drawing,places"
10-
loadingElement={<div style={{ height: `100%` }} />}
11-
containerElement={<div style={{ height: `400px` }} />}
12-
mapElement={<div style={{ height: `100%` }} />}
10+
loadingElement={<div style={{ height: "100%" }} />}
11+
containerElement={<div style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, justifyContent: "flex-end", alignItems: "center" }} />}
12+
mapElement={<div style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, }} />}
1313
/>
1414
);
1515
}

src/components/MapView.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from 'react';
2-
import { withGoogleMap, GoogleMap, Marker } from 'react-google-maps';
1+
import React from "react";
2+
import { withGoogleMap, GoogleMap, Marker } from "react-google-maps";
33

44
export const MapView = withGoogleMap((props) =>
55
<GoogleMap defaultZoom={8}

0 commit comments

Comments
 (0)