google-maps-react

React Google Maps not displaying HeatMap , lat and long not working for my positions

那年仲夏 提交于 2019-12-25 02:54:01
问题 This what i want, each marker to be sharing the same position as the lat and lng as the heatmap, the markers are working perfectly Im having problems sending data towards my heatmap, it seems like The heatmap from google receives and latitude and longitude differently than the markers positions? any idea ? when i create an array of list of objects like this but i want my data read just like my markers is reading it. It receive M for latitude and N for longitude. If i put a it inside a wrapper

google-maps-react get marker position on drag end

隐身守侯 提交于 2019-12-23 09:33:51
问题 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 { onMarkerDragEnd = evt => { console.log(evt); }; render() { const style = { width: "100%", height: "300px" }; let lat = this.props.lat; let lng = this.props.lng; return ( <Map google={this.props.google} style={style} initialCenter={{ lat: lat, lng: lng }}

A toggle button on and off for markers in google maps react

左心房为你撑大大i 提交于 2019-12-13 11:15:12
问题 I want to create button that removes all markers for the google maps react, i already have it working for the heatmap but it does not let me do the same strategy for the markers ? is it because the mapping that is being done ? than you i already set up all the other functions and states just one last step import React, { Component } from 'react'; import { Map, GoogleApiWrapper, InfoWindow, Marker, HeatMap } from 'google-maps-react'; import { connect } from 'react-redux'; const mapStyles = {