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

adding waypoints in the react-google-maps

editable samplecode how to use waypoints in the following code does the waypoints helps to plot the way which I updated in the database wheather the ponits will be based on the points I have updated const DirectionsService = new…
pageNotfoUnd
  • 666
  • 10
  • 20
5
votes
2 answers

Use polyline in google-maps-react?

I am using google-maps-react in my react program. Is there any way to draw polyline between the plotted markers any in-bulid method to make line between the markers
pageNotfoUnd
  • 666
  • 10
  • 20
5
votes
2 answers

React Google Map DirectionsRenderer Issue

As I want to create Route from my current location to a particular clicked marker in React. For Implementing this I am using React Google Map library (react-google-maps) and it's direction example (Direction Example) but unfortunately I am unable to…
UIseeker
  • 97
  • 1
  • 11
4
votes
1 answer

how to change infoWindow Style in react-google-maps reactjs

I want to change the style of infowindow: creat a CSS file to change .gm-style .gm-style-iw-d and .gm-style .gm-style-iw-c proprty but nothing to chnage , i wnat to change or disable max-width ,over-flow:scroll , padding-right,... like this pic :…
Amir Farahani
  • 344
  • 1
  • 6
  • 20
4
votes
1 answer

Creating Custom Buttons in React Google Maps

I am currently working on a personal project using react-google-maps and I am having trouble displaying custom buttons on the map. I want to create a menu button that hovers over the map, just like the top left corner of Google Maps (search…
Julian Rex
  • 89
  • 1
  • 8
4
votes
2 answers

React js delete point from the path update the Polygon

I have the following map, as you should on the map I have a polygon and markers which are the main points of the polygon, below I have the main points of the polygon printed, i.e. the markers. I give the user the possibility to delete points of the…
Paul
  • 3,644
  • 9
  • 47
  • 113
4
votes
1 answer

Unable to access state from render return call - 'Cannot read property 'instructionList' of null'

I am teaching myself React whilst working on a project which uses the react-google-maps package to produce a map with directions from A to B. The map itself works fine, but I've now tried to print the corresponding route directions in html via the…
Faith
  • 101
  • 1
  • 8
4
votes
2 answers

How to get the current zoom of the map [getZoom()] in react-google-maps?

I want to get the current zoom level of my map in react-google-maps like we do in simple google map api with the getZoom() function. How to do this in react-google-maps ? I have looked few answers but none of them are working for me. import React…
user10095818
  • 121
  • 1
  • 1
  • 8
4
votes
0 answers

How to make a moving marker like Uber cars?

I create a marker like this: import React from "react"; import config from 'config'; import { compose, withProps, withState, lifecycle } from "recompose"; import { withScriptjs, withGoogleMap, GoogleMap, Marker, DirectionsRenderer, …
4
votes
2 answers

How to call another function from withHandlers?

I am trying to implement google maps in my app using react-google-maps package. In map, I am showing multiple Marker and used MarkerCluster. Until now I have no issue and easily implemented from the doc. But now I want to show InfoWindow if the…
Gaurav Kumar
  • 1,111
  • 6
  • 25
  • 52
4
votes
1 answer

Create Google Maps Circle and set its radius in React

Given the below data: [ { "id": 1, "name": "Park Slope", "latitude": "40.6710729", "longitude": "-73.9988001" }, { "id": 2, "name": "Bushwick", …
Shashank Shah
  • 2,077
  • 4
  • 22
  • 46
4
votes
1 answer

React-google-maps: How do I create a clickable kml map that shows me meta data of the kml?

Edit: According to the guideline, there is a method called getMetadata(). How can I use this to return the props? Description: Using the React-google-maps package, I've been able to load Google Maps with my own kml file. That KML file contains…
Cédric Bloem
  • 1,447
  • 3
  • 16
  • 34
4
votes
1 answer

Dynamically add, update, delete markers in react-google-maps

Looking at the docs about react-google-maps, I was able to hack together some code to render a map with static data. Now I need to make changes to the map based on new data coming in from API or periodic updates and don't see any talk about how to…
Brian
  • 1,675
  • 3
  • 19
  • 29
4
votes
1 answer

How to customize react-google-map 's marker with local png?

I recently try to implement tomchentw/react-google-maps, but i can't seem to figure out how to cutomize the marker icon, at default, it show a red icon, it worked fine, but when i try to pass in the icon prop, no marker were shown. here is my code:…
ThomasH.Allen
  • 113
  • 2
  • 4
  • 11
4
votes
1 answer

create google map with users location with react

I'm new to React and currently trying to learn how to use react-google-maps library. Tried to show a map with users geolocation as the initialCenter of the map. This is my code: import React from "react"; import { GoogleApiWrapper, Map } from…
arikm9
  • 185
  • 1
  • 13
1 2
3
30 31