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
2
votes
2 answers

change cursor to pointer google-maps-react

I am using google-maps-react. By default, when I put the mouse on map, it shows a hand cursor. I would like to set a normal pointer when person hover on map, and only when start dragging, the cursor become again a hand cursor. I was trying to set…
user0810
  • 886
  • 5
  • 19
  • 33
2
votes
1 answer

Can I use OverlappingMarkerSpiderfier with react-google-maps?

I'm working on a project which uses react-google-maps (https://github.com/tomchentw/react-google-maps) library. It works well, but we stumbled upon a problem with overlapping markers. Ideal solution to our case would be to use this plugin:…
2
votes
1 answer

React: Catch a failed import

I have an a component that crashes my app when a device goes offline. This is because it uses Google Maps, which requires an internet connection. I would like to catch this failed Google Maps import and show an error message (as right now my app…
Frank
  • 735
  • 1
  • 12
  • 33
2
votes
2 answers

How to focus on the marker position with zoom in react using react-google-maps package

How to focus with zoom to the marker position. Once the marker position changes to different location I need to manually zoom in and out and go to the market location. Literally I need to manually scroll and zoom into the position of the marker…
Sharath
  • 2,348
  • 8
  • 45
  • 81
2
votes
1 answer

How do I remove 'close' button from InfoWindow in react-google-maps?

Havent been able to figure out how to do this, is there a way to target with css or is it an option in the lib?
william
  • 31
  • 2
2
votes
0 answers

react-google-maps InfoBox not working with react-datepicker

So, the main problem is that the component InfoBox won't allow "onChange" handlers (I presume). I need that specific one because the 3rd party component (react-datepicker) uses the "onChange" handler to set the date. Digging through the official…
2
votes
3 answers

Polygon not appearing in react-google-maps

I am trying to implement polygons into react-google-maps plugin but it is not working. It has no errors but also i can not see any polygons at map. I can see the map at the page, also markers are appearing. But i can not see any polygon right now. I…
burakkesepara
  • 306
  • 4
  • 14
2
votes
1 answer

React-google-maps zoom issue

I'm using react.google.maps and I'm trying to display different markers based on zoom level. The problem I have is that sometimes when I zoom, the map is not updated (the map tiles are not re-rendered based on the zoom level). This happens when I…
Alin
  • 420
  • 1
  • 5
  • 17
2
votes
1 answer

Typescript and react-google-maps type errors

I'm a beginner with Typescript and very confused. I have a component that uses react-google-maps where the component is reusable. Map.tsx import * as React from 'react'; import { compose, withStateHandlers } from 'recompose'; import { GoogleMap,…
nyphur
  • 2,404
  • 2
  • 24
  • 48
2
votes
1 answer

react-google-maps recompose error - `not a function`

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, withGoogleMap, …
SomethingsGottaGive
  • 1,646
  • 6
  • 26
  • 49
2
votes
2 answers

React - Array iteration: "'l' is not defined" error when an array is iterated

I am new to React. I am trying to display few locations over Google Maps using google-map-react. I am using the below source for it. import React, { Component } from 'react'; import GoogleMapReact from 'google-map-react'; const AnyReactComponent =…
2
votes
1 answer

react-google-maps: multiple info windows opening up

This is probably going to be a stupidly simple react question but please bear with me. I am trying to run a react-google-maps with multiple markers with info windows. Here is the code: const MapWithADirectionsRenderer = compose( withProps({ …
SomethingsGottaGive
  • 1,646
  • 6
  • 26
  • 49
2
votes
2 answers

React google maps Markers disappear after component re-render

I'm having issues with the react-google-maps module, namely with markers and component re-rendering. This is the scenario: Load page with map and 2-3 markers on it (ok) Click a tab on the nav-bar -> page renders something else in a single page app…
Edeph
  • 732
  • 2
  • 12
  • 29
2
votes
0 answers

how to customize google maps in ReactJS

I am new to ReactJS. I have used map by referencing this link it works fine. I have detect my location icon inside search bar. on click, I am able to detect the location and console the formatted address based on lat and long. how ever i wanna…
Ashok
  • 976
  • 3
  • 15
  • 32
2
votes
1 answer

React Google Maps custom marker rotation

I am trying to add a custom marker in React Google Maps and have each marker rotate based on the direction that the item is heading on the road. I am able to make the rotation work when I use path for an svg instead of a url referencing an image.…
tripstar
  • 161
  • 1
  • 2
  • 11