Questions tagged [react-google-maps]

Questions regarding Reactjs component for google maps by tomchentw.

Questions regarding Reactjs component for google maps by tomchentw. https://github.com/tomchentw/react-google-maps.

462 questions
0
votes
1 answer

How to access the methods of the react-google-maps components?

I have a map component that uses the react-google-maps library. I want to be able to draw on that map some polygons and some markers. I have added the drawing controls for that and I am able to use them correctly. Now I want to be able to persist…
Giannoulo
  • 45
  • 7
0
votes
1 answer

How to implement SetFieldValue of my Custom Google Map Component with Formik

I'm new to react and formik. How would I implement setfieldvalue on my custom component (Location Picker)? What I've tried so far is firing setfieldvalue on onDragEnd function Here's the demo I've been working so far…
0
votes
1 answer

How to pass data from a parent component or use axios here in the map function for react-google-maps library?

I try to pass an array of the markers' coordinates and some other props from the index page (parent of the CardTransactionMapRGMs component) to the map function, so it can use the data to map the Markers. However, I can get the props in the…
Ying
  • 299
  • 1
  • 5
  • 20
0
votes
1 answer

How do I get my route to show up on my map with React Google Maps?

I've successfully been able to render the Markers for react-google-maps, but when I started trying to use DirectionsRenderer, I ran into this 'google is not defined' issue. I scoured StackOverflow and the web in general for solutions to this,…
0
votes
1 answer

How to mark clicked pin on react google map?

I have custom markers added to react google map. What I am trying to do is to add custom marker on one that user clicks. I tried to use state, set it to false and then change to true when is clicked but no luck. Here is the marker part of…
youngster
  • 195
  • 1
  • 12
0
votes
0 answers

Why does Object.keys(this.refs) not return all keys?

Hi, so I've redacted some sensitive information from the screen shot, but you can see enough to see my problem. Now, I'm trying to build the UI for a site that gets data from a weather station. I'm trying to use react-google-maps' InfoBox, which…
plainOldNerd
  • 305
  • 2
  • 8
0
votes
1 answer

How to access to the Map object with react-google-maps with functional components?

I can't access to the Map object properties with the react-google-maps library I want to get the vanilla methods, like "getBouds" I couldn't find any information in the docs, I tried with ref, with onIdle. import React, { useState, useMemo,…
dancalderon
  • 65
  • 1
  • 9
0
votes
1 answer

How to set the center position of the map using the google-map-react library

I have the following code in my React class which sets the center position of the map as expected. My issue is that when my componentDidMount completes I want to reset the center position of the map using values returned from my API. This is what…
James
  • 697
  • 4
  • 19
  • 24
0
votes
1 answer

How to embed custom html created design to Marker in google map I am using react-google-maps packahe?

Currently I am using tag to show marker instead of this I want to show custom html design to marker.
0
votes
0 answers

Should I use react-google-maps or inject google-map in react?

I am rendering Poly-lines, Polygons, and Markers in react-google-map with react and all data-sets are independent so one of them updates all others are updated that is unnecessary. My question is should I use react-google-maps or directly inject…
0
votes
1 answer

Blank screen in react-google-maps streetview

About 50% of the time, the StreetViewPanorama shows up as a blank screen depending on the coordinates. Is there a way to check to see if the screen will show up blank before I decide to show the street view? If it will, then I would just like to…
Austin Wolfe
  • 349
  • 1
  • 3
  • 5
0
votes
1 answer

react-google-maps to @react-google-maps/api migration, constant for OverlayType

My app uses the DrawingManager to draw a polygon. in react-google-maps, the "window.google" variable makes constants available. What is proper syntax in "@react-google-map/api" ? react-google-maps:
Franck
  • 257
  • 2
  • 10
0
votes
2 answers

How to stop flickering of Markers on mouseover and onmouseout events in react-google-maps?

I'm using React.js and react-google-maps to implement this. I'm trying to display the InfoWindow on Hovering any Marker and hiding when mouse leaves the Marker. Here's the link for code. (https://codesandbox.io/s/loving-microservice-88oop)
0
votes
1 answer

How to embed textview in react-google-maps?

How to embed textview in react-google-maps? I have successfully created a google map page in react using react-google-maps api. This is how I insert the marker and link the marker using polyline. import React from "react"; import { withScriptjs, …
phoon
  • 369
  • 1
  • 6
  • 21
0
votes
1 answer

Why does Circle revert it's radius in react-google-maps?

I have a react app that adds a circle to a map when you click on the map, the circle has a default radius of 20. Every time I add a circle, this radius shows up fine, but all previous circles have their radii revert to .2. My render is basically:…
Frank
  • 735
  • 1
  • 12
  • 33