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
6
votes
1 answer

How to redraw polygon using DrawingManager from "react-google-maps"

Trying to show predefined coordinates drawn in 'react-google-maps' using DrawingManager Tried to use 'paths' from 'polygonOptions' to achieve it but it didn't ' The paths property is ignored, and the map property of a new polygon is always set to…
JOOBOO
  • 69
  • 1
  • 6
6
votes
3 answers

Display Directions with React Google Maps

I am new to React and am attempting to use google maps to display directions. I have been able to get it to display a single marker but have not found how to reconfigure the code to display the directions. Below is my most recent attempt but it will…
A. Andersen
  • 149
  • 2
  • 3
  • 10
6
votes
1 answer

When displaying multiple markers on a map, how to open just one info window, when clicking on a marker?

I'm using react-google-maps to display a map with markers, and when you click on a marker, all the info windows open up. I would like to display only one marker's info window when I click on it, and for the others to stay closed. Here is my code: …
6
votes
1 answer

Google Maps API twice error due to two modules

I am using react-google-maps along with location-autocomplete in a react app. On page load, I receive the infamous: "You have included the Google Maps API multiple times on this page. This may cause unexpected errors." To repeat, I am using…
Orkun
  • 6,998
  • 8
  • 56
  • 103
6
votes
1 answer

React-Google-Map multiple Info window open

I am currently building a google map api using react-google-maps and I would like to create multiple markers to display info of cities around the world on the info window. But since they are all from the html object. Whenever I clicked on one…
6
votes
3 answers

Google map cluster custom image

I would like to change google map clustering with custom image. However, it does not change anything I provide. This initMap function is https://developers.google.com/maps/documentation/javascript/marker-clustering And I tried to change the…
fiddlest
  • 1,262
  • 2
  • 17
  • 42
6
votes
5 answers

How to access google.maps.Map object with react-google-maps

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 found…
5
votes
1 answer

React-Google-Maps displays two markers, one at the original position and another marker that follows the new center of the map onDrag

I am using react-google-maps to show the location of the user after fetching her co-ordinates using ReactJS. But, when I move marker from the original position, the initial marker stays there, so two markers are created. I don't know how to fix…
5
votes
0 answers

How to add marker MOVING animation in react-google-maps?

How can I implement Marker moving animation in React app. I have used react-google-maps for Google Maps. I am going through the documentation for the library and Google Maps API. There is an option of offset in Google Maps API. But I am not looking…
5
votes
1 answer

React js google map react-google-maps-api add StandaloneSearchBox

I would like to add a StandaloneSearchBox, but I am unable to add it this is the problem I am receiving is this is the code I am using. I did as shown in the documentation example but I am unable to get it working, and I can't find a working…
Paul
  • 3,644
  • 9
  • 47
  • 113
5
votes
2 answers

react-google-maps map not updated when passed props and the marker is one location behind when updated

I have the map working when it loads, but whenever I pass props the map itself never changes. The marker changes, but is always 1 state behind what it should be, obviously a sync issue but I'm not sure how to fix this in my component. class Map…
Matt Brody
  • 1,473
  • 3
  • 14
  • 23
5
votes
1 answer

My google map refreshes every time when I click on a marker

So when i click on a marker the map always refreshes, how can I prevent it? On clicking a marker will render specific infos about that marker, but its always realoading and goes back to its defaultCenter. import React, { Component } from…
Peter
  • 53
  • 1
  • 4
5
votes
0 answers

React-google-maps - MarkerWithLabel - Labels overlap

I'm trying to build a react project with the react-google-maps library. Basically it calculates the best route between 2 points and displays the route on the map using the library above. For drawing I'm using the Polyline and MarkerWithLabel…
Sabbin
  • 2,215
  • 1
  • 17
  • 34
5
votes
2 answers

How can I configure the Google Maps api to show a white Google logo instead of the default version?

this: to this: Is there an API setting to achieve this?
bob_cobb
  • 2,229
  • 11
  • 49
  • 109
5
votes
1 answer

React-google-maps infowindow `React.Children.only expected to receive a single React element child.`

I am trying to open a infowindow on a specific marker on click, however when i click one it appears that all of them are opening instead, and showing me this error: React.Children.only expected to receive a single React element child. This is what…
Daniel Campos
  • 328
  • 2
  • 16
1
2
3
30 31