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

Don't want to re-render even if the state is changed in react-google-maps

I am using an application that displays a Google map with react Google Maps have multiple pins installed, and the state changes by scrolling, and the active flight changes according to the state. At that time, the center of the Google map is set to…
0
votes
2 answers

Automatic adjust height on react-google-maps component

I'm trying to build a map application with react and google maps, I manage to create google maps component and use the map, however, when a navbar component is added I can't find a way to adjust the map's height to the space left without a scroll…
0
votes
0 answers

Input address and display street view image using React JS

when I was thinking of using autofill google address, I need google street view image with that address as well. Didn't find any clear documentation. I am not able to find good node module as well. Need some thing like this Any help would be really…
user12389638
0
votes
2 answers

React OnClick inside stateless function does not work

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…
AnmolS99
  • 3
  • 3
0
votes
1 answer

How to set InfoBox behind Marker - React Google Maps

Problem - I'm currently using react-google-maps and have multiple markers that has an onClick to show a particular infobox. I set the pane of the infobox to 'mapPane' which should put the infobox behind the marker, yet it i still over the marker.…
Jacob John
  • 25
  • 1
  • 8
0
votes
1 answer

Moving the google map according to the marker

I want to move the google map according to the marker. I set the defaultCenter but when i got my current position with lat and lng marker is move correctly but google map is not moving according to the marker. Here is the code import { GoogleMap,…
0
votes
1 answer

Showing/Hiding groups of markers using layers or some other grouping method

I have a set of markers which I want to have visible or not on a React Google map. In ESRI/ArcGIS maps you can create layers which can be turned on or off, but it does not seem any equivalent features exist in Google maps. I suppose can give the…
vogomatix
  • 4,856
  • 2
  • 23
  • 46
0
votes
1 answer

Stop React Google AutoComplete component re-rendering but render everything else on selection

In React when I select anything from AutoComplete it re-renders the Input element, how can I stop it from re-rendering the Input only element but re-render everything else? So far I have tried: To use shouldComponentUpdate() but either I'm using…
Marius
  • 1,664
  • 2
  • 16
  • 28
0
votes
1 answer

onDrag function not working when i m setting state using this plugin react-google-maps in react js

onDrag() function not working when I m setting state using this plugin react-google-maps in react js in GoogleMapComponentWithMarker.js(chield component) !props.isSetMapRef && props.setMapRef(map && map) } …
ila
  • 21
  • 3
0
votes
2 answers

useState not setting after initial setting

I have a functional component that is using useState and uses the @react-google-maps/api component. I have a map that uses an onLoad function to initalize a custom control on the map (with a click event). I then set state within this click event. …
Sean
  • 2,496
  • 7
  • 32
  • 60
0
votes
1 answer

Why I cannot access values in my object after navigator.geolocation.getCurrentPosition() assigning values to it and returns it?

When I assign values to my pos object in function whereAmI using navigator.geolocation.getCurrentPosition() I can see than lat and lng are inside the object, however when I am trying to use those properties, they return undefined. Many thanks for…
Gmiliuta
  • 3
  • 1
0
votes
1 answer

Can not get radius value from Editable Circle onRadiusChanged event

I am new to React Google Maps. I'm unable to get radius value from Circle. https://github.com/JustFly1984/react-google-maps-api I want to get circle redius onRadiusChanged event. index.js import React, { Component } from 'react'; import { render }…
Pallab
  • 145
  • 1
  • 9
0
votes
1 answer

google.maps.places.AutoComplete suddenly stops working and then start working on refreshing the page and then again stops working on next refresh

I just started working google maps and I just want to add two points on the map and draw a direction on it and also want to add radius so I can go for the uber algorithms. When I first refresh the page after changing some code the google place…
0
votes
1 answer

Adding navigation control to my google map

Im running react (in the web browser not native) with the react-google-maps component. I want to enable the navigation button (see the red marker) so the map can be opened in my native app. Any suggestions? See the 2 pictures
heathrow
  • 93
  • 8
0
votes
1 answer

How to add default Options for markers

I want to add a different icon to the markers that are created when i click with the marker drawing control.(react-google-maps package) I tried addding a markerOptions prop in the DrawingManager component but it doesnt seem to work like…
Giannoulo
  • 45
  • 7