91 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
486bccfc61
Use shallowEqual and isEmpty as much as possible (#540)
* Use shallowCompare to compare objects

* Use isEmpty as much as possible

* Use our own shallowEqual

* Remove fbjs

* Just disable necessary line

* Add eslint-disable where needed
2018-03-13 16:59:11 -07:00
Michael Diego
8cb6939e6c
Remove lodash and use our own utils (#535)
* Use pure reduce and map functions

* Use only isEmpty from lodash

* Create our own isEmpty, don't use lodash

* Normalize utils names

* Group utils together

* Proper checking, better this way

* Set default value to options
2018-03-12 15:56:22 -07:00
Alex Leon
e4fa5ff822 call zoomControlClickTime on all clicks (#211)
* call zoomControlClickTime on all clicks

* Update google_map.js
2018-03-10 13:57:34 -08:00
Michael Diego
faf67e5e0e
Accept 0 as zoom value. (#525)
* Accept zoom being 0

* If we set a minZoom, its clear that we want to override it

* Oops! Wrong operators
2018-03-09 11:08:46 -08:00
Fumiya Karasawa
4a071767ff fix error about fromLatLngToDivPixel (#517)
* fix error about fromLatLngToDivPixel

fix "Cannot read property 'fromLatLngToDivPixel' of undefined" #257

* skip only the code that relates to div or overlay
2018-02-23 11:15:02 -08:00
ZAKdev
e50f1d825b Added heatmap functionality (#441)
* Added functionality of heatmap

* Added options for heatmap

* default heatmap prop change to object

* resolve linting issues

* resolve linting

* Added demo for heatmap

* Fixed eslint

* Added heatmapLibrary prop for enable and disable visualization library for components

* Fixed linting

* Added heatmapLibrary={true} in all map components

* Fixed proptypes error

* Added heatmap in README with example code

* removed api key from heatmap component

* Removed unnecessary props from heatmap component
2018-02-12 14:09:38 -08:00
Ondrej Mladek
e47d955a90 Add fullscreen check for Internet explorer 11 (#485)
* Add fullscreen check for Internet explorer 11

Fixing marker position in Internet Explorer 11 in fullscreen mode.
Fixing: https://github.com/istarkov/google-map-react/issues/484

* #484: move fullscreen check to function

* #484 eslint fix
2018-01-04 15:12:01 +01:00
Acellam Guy
7814901c64 notify call back of load failure (#479)
When the google  fails to load due to no internet, the  call back should be notified so that appropriate UI can be shown
2017-12-28 07:42:30 -03:00
Joseph Frazier
0db8020122 Make resetBoundsOnResize preserve center when full-screened (#482)
* lockCenter prop added

* Resolve conflicts

* Fix lint with `yarn lint --fix`

* Add documentation for `lockCenter` prop

* Remove `lockCenter`, add its behavior to `resetBoundsOnResize`

See https://github.com/istarkov/google-map-react/pull/482/files#r158330791
2017-12-22 01:54:12 -03:00
jbcochery
9a418f6aa3 Fix markers position on fullscreen mode (#452) 2017-12-20 18:46:49 -03:00
Ivan Starkov
07368e23ad Move 2 yarn, add prettier, update linters (#360)
* Move 2 yarn, add prettier, update linters

* Fix linting error
2017-04-11 00:47:54 +03:00
Yoad Snapir
5c9d911e4f Fix unresponsive map after outside-click on a touch device with draggable:false (#335)
* Implement workaround fix for mouseout event on touch devices

* fix linting errors
2017-03-10 12:29:59 +03:00
Yoad Snapir
956c0ca5d2 Stop capturing all touch events and use built in google maps support (#334)
* Revert "Fix ipad dragging issue (#233)"
Using the built in support from google maps would make the component more
mobile friendly.

This reverts commit 7d1180c5427750e18411874f538ae6bfbbe33498.

* Improve documentation around touch device support

* Fix linting errors
2017-03-10 12:28:28 +03:00
cybice
438bc12296 Fix google api bug 2016-12-29 19:16:44 +03:00
cybice
3187822309 Fix remove listener 2016-12-29 18:57:35 +03:00
Marius Andra
4da59f0242 fix small typo (add -> remove) (#295) 2016-12-22 22:06:35 +03:00
Lukyanov Fedor
7a9a8d3fb7 Add ne and sw to bounds object (#287)
* Add ne and sw to bounds object

* Add ability to use ne and sw in fitBounds

* Return all corners from fitBounds

* Remove exports object in favour export
2016-11-30 23:13:19 +03:00
Andries Smit
496e9a5d7d Fix reference to maps instead of map. (#283)
Sorry, made a smal but ugly mistake in the last pull request.
The this.maps does not have a function getCenter .... but this.map does
2016-11-24 21:17:59 +03:00
Andries Smit
affee2a8dd Keep original center on _mapDomResizeCallback (#282)
When the resize event is triggered, the original center was lost. 
This issue is significant when the map is renders outside visible dom with zero height and width.
When placed into the visible dom, the resize is triggered correctly. With this change the center will persist. (Without this fix the old center is the top left corner)
2016-11-24 20:09:06 +03:00
Matt Dean
7be0f10591 expose map type callback (#275) 2016-11-24 20:05:30 +03:00
Ivan
6273309665 #add handlers for fly update layers (#272)
* #add handlers for fly update layers

* #remove force param

* Update google_map.js
2016-11-07 12:07:14 +03:00
alex-e-leon
d348c64f85 Fixed componentWillReceiveProps options function bug (#273)
Fixes a bug which prevented you from changing the function passed to
the options prop
2016-11-07 11:31:26 +03:00
Ivan
1c801812b2 #add layerTypes props handler, and GMapLayers view (#264)
* #add layerTypes props handler, and GMapLayers view

* #fix linter, change props place

* #add layerTypes props descrition
2016-11-01 15:46:07 +03:00
cybice
4a25508ecf Closes #260 2016-10-20 20:28:17 +03:00
Ivan Starkov
b8bf3ad03f Fix, I see no reason now to prevent mouseDown event propagation (#248) 2016-09-27 14:49:54 +03:00
Martin Jujou
7d1180c542 Fix ipad dragging issue (#233)
* Fix ipad dragging issue

* Limit touch events to map only
2016-09-01 11:04:09 +03:00
cybice
f23a649011 Fix incorrect onChildMouseDown is called when marker is already removed 2016-08-22 17:42:51 +03:00
Rupesh Singh
e196e9f1e5 Reset Bounds when surrounding div resizes (#219)
* added listeners for element/map resize event

* changed names accordingly

* added eslint-disabled to pass through travis checks

* changes for travis checks

* added eslint disables

* disabling eslint for lNo 906

* removed trailing spaces

* removed unnecessary id and refs

* removed eventListners on unMount
2016-08-22 17:31:02 +03:00
alex-e-leon
476afbfe54 Allow gmap option props to be changed dynamically (#215) 2016-08-10 09:53:48 +03:00
Ivan Starkov
fb3af2cd7c Fix context (#198) 2016-07-20 16:41:15 +03:00
Ivan Starkov
bc83e67490 closes #185 (#186) 2016-07-03 01:50:23 +03:00
David Heidrich
2170819237 calculate current touch position on click (fixes #28) (#178) 2016-06-24 16:34:40 +03:00
Stanislav Ermakov
e1ab7f794b added this.props.center check (#174) 2016-06-16 12:44:42 +03:00
cybice
100c219e1e Test rxjs instead of reconciler, add ability to draw layers, test performance 2016-06-13 17:51:37 +03:00
Ivan Starkov
670fadd2da Add develop (#172)
* Add isNumber

* Update babel, remove lodash deps

* develop first commit

* Fix zIndex

* Add readme

* Fix tests

* Fix build issues

* Update travis build
2016-06-13 03:29:55 +03:00
cybice
5b8936288a Update linter 2016-06-13 01:36:02 +03:00
cybice
5547713e1b Fix error 2016-06-13 00:23:05 +03:00
cybice
936028bc90 Remove draggable from shallowEqual 2016-06-12 23:54:06 +03:00
cybice
13d760d050 Fix map moves back in some cases 2016-05-31 17:13:40 +03:00