376 Commits

Author SHA1 Message Date
Artem Artemyev
45ecda13e6 Added React 16 createPortal with backwards compatibility (#696)
* added react 16 createPortal support with backwards compatibility

* fixed lint errors
2018-12-18 13:02:16 -03:00
Michael Diego
599195510e
Bump to 1.1.1 (#680)
Bump to 1.1.1
1.1.1
2018-11-21 18:13:45 +01:00
Michael Diego
d8d9dc3b63
Revert "Added feature: update heat map on data change + fix linting" (#679)
* Revert "Bump version to 1.1.0 (#671)"

This reverts commit 1603e3afea4cd0fdb88e7b5479f1f3321908afb4.

* Revert "Added feature: update heat map on data change + fix linting (#593)"

This reverts commit 1ce8726fda4cd56694680051125dd107c2817528.
2018-11-21 18:11:50 +01:00
Michael Diego
1603e3afea
Bump version to 1.1.0 (#671)
This includes: 

- #655 Add math abs to avoid negative values when calculating zoom 
- #656 Pass map instance to onDrag handler 
- #593 Added feature: update heat map on data change + fix linting
1.1.0
2018-11-08 15:36:19 +03:00
Donovan De Smedt
1ce8726fda Added feature: update heat map on data change + fix linting (#593)
* Added feature: update heat map on data change

When prop updateHeatmap is set to true --> map will rerender.
- New render of <GoogleMapReact> and data is changed, prop updateHeatmap should be true
- New render of <GoogleMapReact> and data is not changed, prop updateHeatmap should be false

* Supports multiple google map libraries + update heatmap when prop updateHeatmap equals true

* Updated this.props -> nextProps (rookie mistake...)

* Updated API documentation:
- added info about the use of other libraries in the Google Map API
- added info about the updateHeatmap prop
2018-11-08 15:20:30 +03:00
Dmitry Bogomya
4a92a42902 Pass map instance to onDrag handler (#656) 2018-11-08 15:20:12 +03:00
Max Chernin
f73e774a45 add math abs to avoid negative values when calculating zoom (#655)
* add math abs to avoid negative values when calculating zoom

* add math.abs with proper styling to pass tests

* add math.abs to dx\dy on fitbounds
2018-11-08 15:19:33 +03:00
Michael Diego
16236f9d7e
Bump version to 1.0.9 (#651) 1.0.9 2018-09-29 12:46:33 +03:00
Jurgis Kacens
53e0979acb Custom div style options (#634)
* Custom div style options

* fix es-lint issue

* props naming fix

* docs update

* words
2018-09-29 12:37:08 +03:00
Michael Diego
6bca0a4d37
Bump version to 1.0.8 (#646) 1.0.8 2018-09-21 14:07:28 +03:00
Michael Diego
317b5c0999
Revert 643 fix/map context (#645)
* Revert "Bump version to 1.0.7 (#644)"

This reverts commit 800092ae6f57648cf0ed74625a90752283ac1af4.

* Revert "Add passive scroll (#631)"

This reverts commit 40c8f67e78c1b851f5d35ef832ff5ef728db86af.

* Revert "Use React 16 portal to render map overlay (#643)"

This reverts commit b121bb673e9dae5ae558c8c98218f7fc02029da2.
2018-09-21 12:51:04 +03:00
Michael Diego
800092ae6f
Bump version to 1.0.7 (#644) 1.0.7 2018-09-20 20:36:33 +03:00
Martin Jujou
40c8f67e78 Add passive scroll (#631)
* Add passive scroll

* Reworked code
2018-09-20 20:28:23 +03:00
Curtis Layne
b121bb673e Use React 16 portal to render map overlay (#643)
* Use React 16 portal to render map overlay

This allows the new context API to propagate context properly.

* Rename div to overlay
2018-09-20 20:20:22 +03:00
Michael Diego
28506dd427
Fix old examples links and add one to new examples (#633) 2018-08-23 17:19:30 +02:00
Michael Diego
f43ad9b2b4
Bump version to 1.0.6 (#621) 1.0.6 2018-08-03 10:14:32 +02:00
Jonathan Weiß
6d142cb10c Add prop onTilesLoaded (#615)
* Add prop `onTilesLoaded`

* (Adjust package name

* Increase version

* Make linter happy

* Remove scope from package name and reset version number

* Add description for new prop

* Remove "directories" entry

* Correct changelog

* Remove section header

* v2.0.0

* Revert version number

* Only listen to event if prop is used
2018-08-03 09:49:35 +02:00
Stephen Farrar
55f134c60c Fix typo, and call fromContainerPixelToLatLng() as you would expect. (#620) 2018-08-03 09:48:12 +02:00
Ryan Vermooten
e8bbbff34e Update API.md (#611)
Since June 11 2018 all Google Maps Platform API requests must include an API key.
https://developers.google.com/maps/documentation/javascript/usage-and-billing
2018-07-09 17:38:42 +03:00
Michael Diego
2cfb0a64f5
Upgrade version to 1.0.5 (#607) 1.0.5 2018-06-26 23:33:53 +03:00
Stephen Farrar
6c60a536d0 Remove marker jiggle. (#603)
Position the markers relative to the map panes.
Don't position the element that contains the markers.
Renamed all the geo service projection methods, for clarity.
2018-06-26 23:27:32 +03:00
Nguyen Le Vu Long
b1d88c33f9 Update API.md (#606)
Because the parent node of marker has size 0x0, top 50% and right 50% would affect nothing. You only need to translate(-50%, -50%) to move it to the right position.
2018-06-22 19:07:36 +03:00
Michael Diego
a73629b389
Fix build (#605)
* Fix build by updating yarn

* Fix lint

* Fix build by adding react-dom to devDependencies

* Fix lint again
2018-06-22 16:44:26 +03:00
Michael Diego
bc63943a11
Update API.md (#600) 2018-06-11 04:45:28 -03:00
Michael Diego
03cd34dc79
Update 'positioning a marker' docs (#599)
Better way to position a marker
2018-06-11 04:43:48 -03:00
Michael Diego
78256b1d5e
Bump version to 1.0.4 (#598) 1.0.4 2018-06-11 04:18:50 -03:00
David Furlong
26a729b25d Update API.md (#596) 2018-06-11 04:16:02 -03:00
Martin Jujou
fc062a0018 Move dep for react-dom (#592) 2018-05-31 16:32:33 -03:00
Jeffrey Auriemma
99c3c847bb Add guard around mapDom event listener (#594)
Fixes an issue where, even if the end user has a proper google maps API
mock, the GoogleMaps component will throw an error when in a test
env.  ReactDOM.findDOMNode(this.googleMapDom_) returns `null`.

This commit wraps the subsequent addEventListener call in an `if` block,
ensuring that an empty DOM doesn't add complications to test suites
2018-05-31 16:30:27 -03:00
Alexander Sundli-Härdig
d6576f226f Avoid null error (#570)
Avoid the error "Cannot read property 'removeEventListener' of null"
2018-05-25 07:05:45 -03:00
Michael Diego
cdd6ec658f
Bump to v1.0.3 (#582) 1.0.3 2018-05-16 23:59:26 -03:00
Matt Togstad
92b502bd2d Option to position and size components with two corners. (#580)
* Option to position components with two corners.

This lets you lock a component to a specific bounding rectangle, which allows for precise tiling during zoom.

* Add a comment explaining two point positioning.
2018-05-16 23:56:31 -03:00
Michael Diego
ef8b871d56 Fix GH pages 2018-05-13 16:21:25 -03:00
Michael Diego
f6bb0039c0
Update Readme jsbin examples (#578) 1.0.2 2018-05-13 16:03:03 -03:00
Michael Diego
a1aa3141f7 Fix README.md 2018-05-13 15:47:58 -03:00
Michael Diego
d4d5917cc0 Bump to 1.0.2 2018-05-13 14:54:03 -03:00
Michael Diego
6680cc5fcf Move react-dom from peer to dependencies 2018-05-13 14:52:58 -03:00
Michael Diego
b7d61df5f6
Move react-dom to dependencies (#577)
* Move react-dom to dependencies

* Actually, move react-dom to peer-dependency
2018-05-13 14:28:09 -03:00
Michael Diego
586d9c4d1a
Update Readme.md
Fix example
1.0.1
2018-05-11 10:54:26 -03:00
Michael Diego
7de6933b57 Use new apiKey 2018-05-10 16:24:24 -03:00
Michael Diego
cc4eadb883 Bump version to 1.0.1 2018-05-10 15:53:55 -03:00
Donovan De Smedt
4faeeef56d added feature to add weights to the heatmap (#572) 2018-05-08 19:09:13 -03:00
Michael Diego
0d3acb564e Release 1.0.0 1.0.0 2018-04-27 16:55:34 -03:00
Stephen Farrar
7877008e17 Fix zoom animation for v3.32 (#559)
* Use the experimental version, to get the new zoom animation.

* Don't use bounds for rendering in 3.32

* Revert the project() and unproject() methods.

Instead, add a new method fromLatLngToContainerPixel() to geo service.

* No need of setting .exp, that is by default

* Comments explaining the significance of API v3.32

* Add _VERSION to const
2018-04-27 16:48:01 -03:00
Michael Diego
aec0c08aae
Fix code styling in develop (#564) 2018-04-18 15:11:47 -03:00
Michael Diego
898474d3f9
Oops! Fix typo 2018-04-18 15:01:47 -03:00
Michael Diego
04d41c8685
Move links to org instead of Ivan's repo, they were broken (#563) 2018-04-18 15:00:26 -03:00
kal
147997c5f7 added if statement in onRemove() function (#555)
Added an if statement in onRemove() function that checks if "this.div" is defined before calling ReactDOM.unmountComponentAtNode(this.div). This is done to avoid throwing an "unmountComponentAtNode(...): Target container is not a DOM element" error. I ran into this error while using google-map-react with React Router and switching between tabs rapidly to stress test my application.
2018-04-17 14:20:09 -03:00
Michael Diego
9d0b3939ba
Use our own omit.js (#561) 2018-04-17 13:31:01 -03:00
Michael Diego
b6e4d628ef
Improve documentation (#548)
* Move heatMap docs to API.md

* Upgrade example code style

* Specify that we need a container in the example

* Actually, remove propTypes, will confuse ppl

* Add more instructions

* Add main title

* Quick corrections

* Add PRs welcome status

* Move features down

* Actually, lets not use PFC, will avoid confusions

* Remove center from tips, its obvius

* Remove bower message, not needed I believe

* Clearer documentation
2018-03-21 18:50:20 -07:00