

The GoogleApiWrapper is a Higher-Order Component (HOC) that provides a wrapper around Google APIs. and a location of -1.2884, 36.8233 (Kenyatta International Convention Centre in Nairobi, Kenya)Īnd ensure that the map loads to the browser:.a CSS style object with 100% width and 100% height.initialCenter - an object containing latitude and longitude coordinates.zoom - number value representing a tighter focus on the map’s center.The Map component takes in some optional props: Warning: Be sure to avoid saving your API key in any files you commit to public repositories (like GitHub) as it can then be used by others for purposes you did not intend.įor the functionality of a basic Google Map, this is all the code you need.
