Questions tagged [react-google-maps-api]
93 questions
0
votes
0 answers
React google maps API how to make the marker icon fixed size
I've a google map with some markers, but when I zoom in and out the marker icon size changes, is there any way to make that size fixed?
const [markers,setMarkers] = useState([])
function generaMarker(elementolo,index){
var mark =…

VondeTaconadis
- 64
- 9
0
votes
0 answers
Cant render react google maps data before refresh page
In may app I have to show a list of markers and markers that are already stored in sessionStorage, but I cant set markers, zoom and center of the map at first render of the page, I nees refresh the page to see data on it.
FIRST RENDER:
AFTER…

Fideles
- 11
- 8
0
votes
0 answers
Markers not showing up with react-google-maps/api
I am trying to create a marker and have tried isolating the problem to just creating a marker already in the map when it loads.I am using React 17 and cannot upgrade to 18 because it will cause errors in other dependencies.
So far I've tried:
Using…

nizoom
- 105
- 6
0
votes
0 answers
How to change the stroke color of a polygon onMouseEnter in React Google Map API
I am having an array of polygon coordinates which are being mapped and displayed on the map.
Secondly, I have a mouseenter and mouseout event which takes in the particular lat and lng coordinate of a particular polygon and zooms over them to focus…

Emmanuel Eboh
- 41
- 7
0
votes
1 answer
Infowindow on Marker Cluster - @react-google-maps
Is there any way to show an Info Window on a marker cluster in @react-google-maps, we have displayed an info window on a single marker which works absolutely fine but didn't find a way to display the same for a marker cluster.
What have I already…

Praveen Rao Chavan.G
- 2,772
- 3
- 22
- 33
0
votes
0 answers
Google maps Api SVG is not displayed in icons
SVG is not displayed in icons
Referenced sites
Add a background image (.png) to a SVG circle shape
https://codesandbox.io/s/react-google-maps-api-forked-pcup77?file=/src/index.js
source code
…

Taiki
- 23
- 3
0
votes
0 answers
Is there a way to change default marker color?
I am currently trying to change the color of the default marker on the map. The library that is being used is @react-google-maps/api.
This is the load handler for the markers:
const markerLoadHandler = (marker, mPos) => {
return { [mPos.index]:…

Jukka Koivu
- 269
- 4
- 15
0
votes
0 answers
Remove/hide polygon from Google Map on react-google-maps/api
@react-google-maps/api": "^2.13.1" | https://www.npmjs.com/package/@react-google-maps/api
Hi Everybody. My name is Hassan & I'm a freelance React JS developer. I have been working with this API to build project for a client on Upwork. What I want to…
0
votes
0 answers
How to load geojson data on React google map api and detect user click
i am implementing @react-google-maps/api package to draw google map on my React application, Now i have loaded geoJson its working fine. Now the requirement is i need to check whether the user click inside the geoJson data or outside and show that…

Andaman
- 295
- 3
- 10
0
votes
1 answer
How to remove pattern from react-google-maps/api map?
I am having an issue when loading the react-google-maps/api map. It displays properly but there appears to be a pattern that appears when zooming in, or zooming out. The shapes seem to mess up the look of the map overall.
Map with white diamond like…

RowBear
- 1
0
votes
0 answers
MarkerClusterer error @react-google-maps/api
I'm using @react-google-maps/api in my React + Typescript project. I have a scenario where 4 markers have exact the same latitude and longitude. I tried to implement the MarkerClusterer using @react-google-maps/api docs. But it doesn't seem to work.…

kacper3671
- 136
- 1
- 3
- 11
0
votes
1 answer
How to trigger function on button onClick in the InfoWindow content in react-google-maps/api?
I am trying to trigger the function reportPost() on the button onClick which is located in the infoWindow element. When I click on the marker icon and infoWindow starts to render, the function triggers itself and when the window is already loaded,…

FilipSokol
- 3
- 1
- 1
0
votes
0 answers
why is my useState returning a null value
I am in the middle of a tutorial project of building somewhat a tourist guide. I am to use a travel advisor api to get data on all restaurants, hotels and attractions from anywhere we go to on our map. in relation, i am also using google maps api to…

gerard
- 221
- 1
- 2
- 10
0
votes
0 answers
Polygon hole is sometime not empty (Google Maps Api)
I am using google map api to draw a polygon and 4 holes inside of it, three holes are working fine but the fourth one is rendering like shaded polygon
Below is the defined code i am using to create polygon
const paths = [_coordinates];
const…

shahneel ahmed
- 1
- 1
0
votes
1 answer
Invalid LatLng object: (37.42216, undefined) error when rendering google map on my react-redux app
I'm trying to render google map on my react-redux app. Everything was was working fine. Until when I decided to add some custom markers to the rendered google map. Now the page is blank because of this error I see in my browser console
lat_lng.js:21…

simper
- 19
- 9