Questions tagged [google-maps-react]

Questions related to google maps react component library by Fullstack

Questions related to google maps react component library by Fullstack (https://github.com/fullstackreact/google-maps-react)

148 questions
11
votes
1 answer

How to render a component onClick with React?

I'm trying to render a map of a specific location that's being passed from a parent component. I'm using google-maps-react and i'm unsure of two things: How to call to functions with onClick inside my render. And how to write the function in my…
user7496931
9
votes
6 answers

google-maps-react get marker position on drag end

I'm trying to figure out how to retrieve the marker position when the marker is dragged. I found this : Drag marker event with callback providing lat/long? and implemented on my app like so: export class MapContainer extends React.Component { …
Alexander Spanos
  • 177
  • 1
  • 2
  • 10
5
votes
2 answers

Difference between google-map-react and google-maps-react?

While i'm using Google maps in reactjs, I found two different npms like google-map-react and google-maps-react. As i'm beginner of react i'm bit confused what to use(prefer). Although I found this link but it is bit different which is about-…
Ramlal S
  • 1,573
  • 1
  • 14
  • 34
5
votes
3 answers

Google Places Autocomplete along with google maps - load issue

I am using google-maps-react in my project. Now i need to integrate places api inside the maps. But it seems there is some load order issue and so i am getting the following error. Error: [react-places-autocomplete]: Google Maps JavaScript API…
prajeesh
  • 2,202
  • 6
  • 34
  • 59
4
votes
1 answer

Google Maps MarkerClusterer in React with @react-google-maps/api

I am getting an error while I want to implement MarkerClusterer from @react-google-maps/api. The error that I am getting is No overload matches this call. Overload 1 of 2, '(props: MarkerClustererProps | Readonly): ClustererComponent', gave the…
4
votes
1 answer

Google Maps React Wrapper - Places API

I'm using the Google ReactJS library to add Maps to my React web app. @googlemaps/react-wrapper I was wondering if anyone has implemented Places autocomplete using this wrapper? In my past experience with Places, the implementation has been to load…
Mike
  • 331
  • 2
  • 12
3
votes
3 answers

remove circles from google map react

I am using project, among the things I am rendering on the map, are circles called geoFences. The problem is that I want to change the circles sometimes, but instead of chaning them, the map is rendering them on top of eachother. …
Zusman
  • 606
  • 1
  • 7
  • 31
3
votes
1 answer

How to add custom controls on google map?

I am using google-maps-react library and i want to add cutom controls on google map like buttons, input elements etc. plaese see image i want like this.
vijay kasar
  • 145
  • 1
  • 12
3
votes
0 answers

Can't understand console error: 'Uncaught TypeError: t is not a function'

I am attempting to host a Ruby on Rails / React app in Heroku. Also of not, I am using the package google-maps-react ( https://github.com/fullstackreact/google-maps-react ). Everything works locally, but when I push to heroku, nothing displays, and…
muceyMuce
  • 119
  • 1
  • 2
  • 8
3
votes
2 answers

Google-maps-react not loading map

When I'm trying to load component with Google Maps, (props was passed to the component as expected), I'm just getting a message saying "Loading map..." but a map with markers was not loaded. No errors in the console as well. Here is the component.…
andrey.shedko
  • 3,128
  • 10
  • 61
  • 121
3
votes
1 answer

GoogleMaps React: Open InfoWindow by Default - not from onClick

I would like to have an info window open by default above a marker in a google maps component in my react project. I have tried to accomplish this by having a ref for the marker component, the handler for which calls the marker onclick method which…
3
votes
2 answers

How to get all markers in google-maps-react

I have the google-maps-react in my project, but I don't know how to get all markers from the map? import React, { Component } from "react"; import { Map, InfoWindow, Marker, GoogleApiWrapper } from "google-maps-react"; import…
3
votes
0 answers

How to use fitbounds() to center and display all markers in react

I am a beginner with react and I am trying to use circle() and fitbounds() to get all my markers to display on the screen. Right now only the first marker shows on the screen but when I zoom out I can see the rest. However, I want all the markers to…
AKB31595
  • 31
  • 1
3
votes
1 answer

TypeError: Cannot read property 'array' of undefined when trying to use google-maps-react

I am new to ReactJS, but familiar with React Native. I am trying to to get a basic map component to be displayed. My map component is WaterMapView.js import React, { Component } from 'react'; import { Map, InfoWindow, Marker, GoogleApiWrapper }…
arc
  • 71
  • 8
2
votes
1 answer

google-maps-react Map not showing up

I'm working on an app where I'd like to display a google maps with a marker. I thought I followed the steps correctly on the google-maps-react documentation, but I'm having issues. First, the map shows up gray and none of the land/ocean is…
1
2 3
9 10