Skip to content
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

fix(build): Fixed build issues caused by updated Google Maps docs #952

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/components/GoogleMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ var Map = (exports.Map = (function(_React$PureComponent) {
context
)
)

;(0, _invariant2.default)(
!!_this.context[_constants.MAP],
"Did you wrap <GoogleMap> component with withGoogleMap() HOC?"
Expand Down
1 change: 0 additions & 1 deletion lib/components/GroundOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ var GroundOverlay = (exports.GroundOverlay = (function(_React$PureComponent) {
GroundOverlay.__proto__ || (0, _getPrototypeOf2.default)(GroundOverlay)
).call(this, props, context)
)

;(0, _warning2.default)(
!props.url || !props.bounds,
"\nFor GroundOveray, url and bounds are passed in to constructor and are immutable\n after iinstantiated. This is the behavior of Google Maps JavaScript API v3 (\n See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay)\n Hence, use the corresponding two props provided by `react-google-maps`.\n They're prefixed with _default_ (defaultUrl, defaultBounds).\n\n In some cases, you'll need the GroundOverlay component to reflect the changes\n of url and bounds. You can leverage the React's key property to remount the\n component. Typically, just `key={url}` would serve your need.\n See https://github.com/tomchentw/react-google-maps/issues/655\n"
Expand Down
1 change: 0 additions & 1 deletion lib/components/OverlayView.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ var OverlayView = (exports.OverlayView = (function(_React$PureComponent) {
key: "draw",
value: function draw() {
var mapPaneName = this.props.mapPaneName

;(0, _invariant2.default)(
!!mapPaneName,
"OverlayView requires either props.mapPaneName or props.defaultMapPaneName but got %s",
Expand Down
1 change: 0 additions & 1 deletion lib/components/StreetViewPanorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ var StreetViewPanorama = (exports.StreetViewPanorama = (function(
(0, _getPrototypeOf2.default)(StreetViewPanorama)
).call(this, props, context)
)

;(0, _invariant2.default)(
!!_this.context[_constants.MAP],
"Did you render <StreetViewPanorama> as a child of <GoogleMap> with withGoogleMap() HOC?"
Expand Down
1 change: 0 additions & 1 deletion lib/components/drawing/DrawingManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ var DrawingManager = (exports.DrawingManager = (function(_React$PureComponent) {
(0, _getPrototypeOf2.default)(DrawingManager)
).call(this, props, context)
)

;(0, _invariant2.default)(
google.maps.drawing,
'Did you include "libraries=drawing" in the URL?'
Expand Down
1 change: 0 additions & 1 deletion lib/components/places/SearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ var SearchBox = (exports.SearchBox = (function(_React$PureComponent) {
var _ref

var _temp, _this, _ret

;(0, _classCallCheck3.default)(this, SearchBox)

for (
Expand Down
2 changes: 0 additions & 2 deletions lib/components/places/StandaloneSearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ var SearchBox = (function(_React$PureComponent) {
var _ref

var _temp, _this, _ret

;(0, _classCallCheck3.default)(this, SearchBox)

for (
Expand Down Expand Up @@ -127,7 +126,6 @@ var SearchBox = (function(_React$PureComponent) {
this.props,
searchBox
)

;(0, _MapChildHelper.componentDidMount)(this, searchBox, eventMap)
this.setState(
(0, _defineProperty3.default)({}, _constants.SEARCH_BOX, searchBox)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Circle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export class Circle extends React.PureComponent {

/**
* Gets the `LatLngBounds` of this Circle.
* @type LatLngBoundsLatLngBounds
* @type LatLngBounds
* @public
*/
getBounds() {
Expand Down
4 changes: 2 additions & 2 deletions src/components/DirectionsRenderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class DirectionsRenderer extends React.PureComponent {

/**
* Returns the panel `<div>` in which the `DirectionsResult` is rendered.
* @type Node<div>DirectionsResult
* @type Node
* @public
*/
getPanel() {
Expand All @@ -138,7 +138,7 @@ export class DirectionsRenderer extends React.PureComponent {

/**
* Returns the current (zero-based) route index in use by this `DirectionsRenderer` object.
* @type numberDirectionsRenderer
* @type number
* @public
*/
getRouteIndex() {
Expand Down
16 changes: 5 additions & 11 deletions src/components/GoogleMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,6 @@ export class Map extends React.PureComponent {
*/
onProjectionChanged: PropTypes.func,

/**
* function
*/
onResize: PropTypes.func,

/**
* function
*/
Expand Down Expand Up @@ -275,7 +270,7 @@ export class Map extends React.PureComponent {

/**
* Returns the lat/lng bounds of the current viewport. If more than one copy of the world is visible, the bounds range in longitude from -180 to 180 degrees inclusive. If the map is not yet initialized (i.e. the mapType is still null), or center and zoom have not been set then the result is `null` or `undefined`.
* @type LatLngBoundsnullundefined
* @type LatLngBounds
* @public
*/
getBounds() {
Expand All @@ -284,7 +279,7 @@ export class Map extends React.PureComponent {

/**
* Returns the position displayed at the center of the map. Note that this `LatLng` object is _not_ wrapped. See `[LatLng](#LatLng)` for more information.
* @type LatLngLatLngLatLng
* @type LatLng
* @public
*/
getCenter() {
Expand Down Expand Up @@ -329,7 +324,7 @@ export class Map extends React.PureComponent {

/**
* Returns the current `Projection`. If the map is not yet initialized (i.e. the mapType is still null) then the result is null. Listen to `projection_changed` and check its value to ensure it is not null.
* @type ProjectionProjectionprojection_changed
* @type Projection
* @public
*/
getProjection() {
Expand All @@ -338,7 +333,7 @@ export class Map extends React.PureComponent {

/**
* Returns the default `StreetViewPanorama` bound to the map, which may be a default panorama embedded within the map, or the panorama set using `setStreetView()`. Changes to the map's `streetViewControl` will be reflected in the display of such a bound panorama.
* @type StreetViewPanoramaStreetViewPanoramasetStreetView()streetViewControl
* @type StreetViewPanorama
* @public
*/
getStreetView() {
Expand All @@ -347,7 +342,7 @@ export class Map extends React.PureComponent {

/**
* Returns the current angle of incidence of the map, in degrees from the viewport plane to the map plane. The result will be `0` for imagery taken directly overhead or `45` for 45° imagery. 45° imagery is only available for `satellite` and `hybrid` map types, within some locations, and at some zoom levels. **Note:** This method does not return the value set by `setTilt`. See `setTilt` for details.
* @type number045satellitehybridsetTiltsetTilt
* @type number
* @public
*/
getTilt() {
Expand Down Expand Up @@ -385,7 +380,6 @@ const eventMap = {
onHeadingChanged: "heading_changed",
onIdle: "idle",
onProjectionChanged: "projection_changed",
onResize: "resize",
onTiltChanged: "tilt_changed",
onZoomChanged: "zoom_changed",
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/GroundOverlay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ For GroundOveray, url and bounds are passed in to constructor and are immutable

/**
* Gets the `LatLngBounds` of this overlay.
* @type LatLngBoundsLatLngBounds
* @type LatLngBounds
* @public
*/
getBounds() {
Expand Down
23 changes: 0 additions & 23 deletions src/components/Marker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ export class Marker extends React.PureComponent {
*/
defaultOptions: PropTypes.any,

/**
* @type MarkerPlace
*/
defaultPlace: PropTypes.any,

/**
* @type LatLng|LatLngLiteral
*/
Expand Down Expand Up @@ -140,11 +135,6 @@ export class Marker extends React.PureComponent {
*/
options: PropTypes.any,

/**
* @type MarkerPlace
*/
place: PropTypes.any,

/**
* @type LatLng|LatLngLiteral
*/
Expand Down Expand Up @@ -403,15 +393,6 @@ export class Marker extends React.PureComponent {
return this.state[MARKER].getOpacity()
}

/**
*
* @type MarkerPlace
* @public
*/
getPlace() {
return this.state[MARKER].getPlace()
}

/**
*
* @type LatLng
Expand Down Expand Up @@ -517,10 +498,6 @@ const updaterMap = {
instance.setOptions(options)
},

place(instance, place) {
instance.setPlace(place)
},

position(instance, position) {
instance.setPosition(position)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/OverlayView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class OverlayView extends React.PureComponent {

/**
* Returns the panes in which this OverlayView can be rendered. The panes are not initialized until `onAdd` is called by the API.
* @type MapPanesonAdd
* @type MapPanes
* @public
*/
getPanes() {
Expand All @@ -173,7 +173,7 @@ export class OverlayView extends React.PureComponent {

/**
* Returns the `MapCanvasProjection` object associated with this `OverlayView`. The projection is not initialized until `onAdd` is called by the API.
* @type MapCanvasProjectionMapCanvasProjectionOverlayViewonAdd
* @type MapCanvasProjection
* @public
*/
getProjection() {
Expand Down
8 changes: 4 additions & 4 deletions src/components/StreetViewPanorama.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class StreetViewPanorama extends React.PureComponent {

/**
* Returns the heading and pitch of the photographer when this panorama was taken. For Street View panoramas on the road, this also reveals in which direction the car was travelling. This data is available after the `pano_changed` event.
* @type StreetViewPovpano_changed
* @type StreetViewPov
* @public
*/
getPhotographerPov() {
Expand All @@ -247,7 +247,7 @@ export class StreetViewPanorama extends React.PureComponent {

/**
* Returns the current `LatLng` position for the Street View panorama.
* @type LatLngLatLng
* @type LatLng
* @public
*/
getPosition() {
Expand All @@ -265,7 +265,7 @@ export class StreetViewPanorama extends React.PureComponent {

/**
* Returns the status of the panorama on completion of the `setPosition()` or `setPano()` request.
* @type StreetViewStatussetPosition()setPano()
* @type StreetViewStatus
* @public
*/
getStatus() {
Expand All @@ -274,7 +274,7 @@ export class StreetViewPanorama extends React.PureComponent {

/**
* Returns `true` if the panorama is visible. It does not specify whether Street View imagery is available at the specified position.
* @type booleantrue
* @type boolean
* @public
*/
getVisible() {
Expand Down
23 changes: 0 additions & 23 deletions src/components/addons/MarkerWithLabel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ export class MarkerWithLabel extends React.PureComponent {
*/
defaultOptions: PropTypes.any,

/**
* @type MarkerPlace
*/
defaultPlace: PropTypes.any,

/**
* @type LatLng|LatLngLiteral
*/
Expand Down Expand Up @@ -173,11 +168,6 @@ export class MarkerWithLabel extends React.PureComponent {
*/
options: PropTypes.any,

/**
* @type MarkerPlace
*/
place: PropTypes.any,

/**
* @type LatLng|LatLngLiteral
*/
Expand Down Expand Up @@ -452,15 +442,6 @@ export class MarkerWithLabel extends React.PureComponent {
return this.state[MARKER_WITH_LABEL].getOpacity()
}

/**
*
* @type MarkerPlace
* @public
*/
getPlace() {
return this.state[MARKER_WITH_LABEL].getPlace()
}

/**
*
* @type LatLng
Expand Down Expand Up @@ -598,10 +579,6 @@ const updaterMap = {
instance.setOptions(options)
},

place(instance, place) {
instance.setPlace(place)
},

position(instance, position) {
instance.setPosition(position)
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/drawing/DrawingManager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class DrawingManager extends React.PureComponent {

/**
* Returns the `DrawingManager`'s drawing mode.
* @type OverlayTypeDrawingManager
* @type OverlayType
* @public
*/
getDrawingMode() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/places/SearchBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class SearchBox extends React.PureComponent {

/**
* Returns the query selected by the user, or `null` if no places have been found yet, to be used with `places_changed` event.
* @type Array<PlaceResult>nullplaces_changed
* @type Array<PlaceResult>
* @public
*/
getPlaces() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/places/StandaloneSearchBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class SearchBox extends React.PureComponent {

/**
* Returns the query selected by the user, or `null` if no places have been found yet, to be used with `places_changed` event.
* @type Array<PlaceResult>nullplaces_changed
* @type Array<PlaceResult>
* @public
*/
getPlaces() {
Expand Down
Loading