I'm new to React and currently trying to learn how to use react-google-maps library. Tried to show a map with users geolocation as the initialCenter of the map.  This is my code:  import React from "react"; import { GoogleApiWrapper, Map...
I'm struggling to find a very simple example of how to add a marker(s) to a Google Map when a user left clicks on the map using React-google-maps in components based. Need help.  const Map = withScriptjs(withGoogleMap((props) =>   <GoogleMa...
I have a pretty simple react application using https://github.com/tomchentw/react-google-maps but I'm having difficulty understanding how to get a reference to my current map or how to access the google.maps.Map object in a custom component.  I f...
I am getting an error when trying to run a top level defined react-google-maps component. (0 , _reactGoogleMaps.withProps) is not a function  Here is my code (codesandbox):  import * as React from 'react' import {   withScriptjs,   withGoogle...
I am trying to reload Google Maps with the new inputted location, but it is not reloading. The correct value of lat and lng is being passed back from the SearchBar component and the state is updating correctly. I am new to react-google-maps, so I am...
I have implemented react-google-maps with the <Drawing Manager />.  Not sure how to use the object it returns from onPolylineComplete though. Doesn't seem to be documented either. I want to check some other locations appear in the area - so...
I've found this post here with a similar issue, but it didn't help. Google Map Marker as Reactjs Component  In my database I have some Latitude and Longitude values stored. I retrieve these values in a model to display some data for the user....
error screenshot  below is the code snapshot:   render() {         const AsyncMap = withScriptjs(withGoogleMap(props => (             <GoogleMap defaultZoom={15} defaultCenter={{lat: this.state.mapPosition.lat, lng: this.state.mapPosition.lng}}...
I am using react-google-maps to make a map with markers that show InfoWindows, where you are able to press a button to print something to the console. I use the following code, but the onClick does not execute the function:  function Map() {    const...
react-google-maps is used, however, the pins are being distorted and stretched, even though the width/height and the source image itself says for it to be a square as seen below:  <Marker       {...markerProps}       icon={{         url: `/static/...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.