-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HeatmapLayer Component #248
Conversation
Allows a HeatmapLayer to be created. Takes an array of `google.maps.LatLng` objects to the prop `data`.
@zolrath Matt, why are you not using /lib/ for this addon ? were you able to compile those files and execute these pr ? im getting |
@zolrath i put your heatmaplayer on my own repo https://www.npmjs.com/package/react-gl-maps just check the /lib/ its missing the babel compilation |
@cristiandley for PRs, it should be clean enough for anyone to see the changes. |
// https://developers.google.com/maps/documentation/javascript/3.exp/reference#HeatmapLayer | ||
// | ||
// [].map.call($0.querySelectorAll("tr>td>code"), function(it){ return it.textContent; }).filter(function(it){ return it.match(/^get/) && !it.match(/^getMap/); }) | ||
getData() { return this.state.directionsRenderer.getDirections(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be removed?
@zolrath Just left one code review comment. Also, I'd like this component to be under Other than that, great work! |
I will make the requested changes right now, thanks! |
Can you add also the Thanks and i make my final review |
@cristiandley In the ControlledPropTypes function of the other components I see:
From what I can tell that means I should not expose |
@cristiandley let's hold this on for |
@tomchentw yes! :) |
Any progress on this? |
What changes need to be done to get this into the new version of react-google-maps? |
Released v5.1.0 on npm |
Hello everyone, Here is my implementation: import { withGoogleMap, GoogleMap, Marker, HeatmapLayer } from "react-google-maps";
<HeatmapLayer
data = {[
37.782, -122.447,
37.782, -122.445
]}
/> Can anyone tell me if I am missing anything? |
Seconded farhan here, if anybody has successfully implemented the heatmap layer, would you mind posting an example of syntax? The documentation is scarce. Thank you. |
+1 looking for the syntax example as well |
@farhan687 did you figure out how to use? I'm with the same problem here |
Hi guys. |
Even with this change, I get "b.lat() is not a function". |
ZephD, you can create an array like If you load the google maps script in your index html file, should work fine. Here is working fine.. But we need to fix this bug. When we deploy to production, the node will download the lib with the wrong path. |
But I do not have google maps in the index file, because that'll be too easy. Google maps is loaded Async, so I do not have access to new google.maps.LatLng, hence the problem. See #409. |
Hello, I am using this way:
Version 7.1.0 working great. |
@GustavoMantuan could you tell me how you were able to access |
@malindap92 add |
Allows a HeatmapLayer to be created. Takes an array of
google.maps.LatLng
objects to the propdata
.I'm not sure what events this should really be listening for so if you have any suggestions or things I need to change please let me know!