@react-google-maps/api
Advanced tools
Comparing version 1.2.0-alpha.12 to 1.2.0-alpha.13
@@ -83,13 +83,4 @@ "use strict"; | ||
_this.setClustererCallback = function () { | ||
if (_this.state.markerClusterer !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.markerClusterer | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.markerClusterer); | ||
} | ||
if (_this.state.markerClusterer !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.markerClusterer); | ||
} | ||
@@ -96,0 +87,0 @@ }; |
@@ -50,9 +50,2 @@ "use strict"; | ||
_this.state.directionsRenderer.setMap(_this.context); | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.directionsRenderer | ||
}); | ||
if (_this.props.onLoad) { | ||
@@ -59,0 +52,0 @@ _this.props.onLoad(_this.state.directionsRenderer); |
@@ -26,7 +26,4 @@ "use strict"; | ||
_this.setDirectionsServiceCallback = function () { | ||
if (_this.state.directionsService !== null) { | ||
_this.state.directionsService.route(_this.props.options, _this.props.callback); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.directionsService); | ||
} | ||
if (_this.state.directionsService !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.directionsService); | ||
} | ||
@@ -33,0 +30,0 @@ }; |
@@ -77,13 +77,4 @@ "use strict"; | ||
_this.setCircleCallback = function () { | ||
if (_this.state.circle !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.circle | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.circle); | ||
} | ||
if (_this.state.circle !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.circle); | ||
} | ||
@@ -90,0 +81,0 @@ }; |
@@ -35,3 +35,3 @@ "use strict"; | ||
onOverlayComplete: "overlaycomplete", | ||
ondrawingManagerComplete: "drawingManagercomplete", | ||
onPolygonComplete: "polygoncomplete", | ||
onPolylineComplete: "polylinecomplete", | ||
@@ -57,13 +57,4 @@ onRectangleComplete: "rectanglecomplete" | ||
_this.setDrawingManagerCallback = function () { | ||
if (_this.state.drawingManager !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.drawingManager | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.drawingManager); | ||
} | ||
if (_this.state.drawingManager !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.drawingManager); | ||
} | ||
@@ -70,0 +61,0 @@ }; |
@@ -74,9 +74,2 @@ "use strict"; | ||
_this.props.anchor !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.infoWindow | ||
}); | ||
_this.state.infoWindow.setContent(_this.containerElement); | ||
@@ -83,0 +76,0 @@ _this.open(_this.state.infoWindow, _this.props.anchor); |
@@ -106,13 +106,4 @@ "use strict"; | ||
_this.setMarkerCallback = function () { | ||
if (_this.state.marker !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.marker | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.marker); | ||
} | ||
if (_this.state.marker !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.marker); | ||
} | ||
@@ -119,0 +110,0 @@ }; |
@@ -75,13 +75,4 @@ "use strict"; | ||
_this.setPolygonCallback = function () { | ||
if (_this.state.polygon !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.polygon | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.polygon); | ||
} | ||
if (_this.state.polygon !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.polygon); | ||
} | ||
@@ -88,0 +79,0 @@ }; |
@@ -72,13 +72,4 @@ "use strict"; | ||
_this.setPolylineCallback = function () { | ||
if (_this.state.polyline !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.polyline | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.polyline); | ||
} | ||
if (_this.state.polyline !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.polyline); | ||
} | ||
@@ -85,0 +76,0 @@ }; |
@@ -73,13 +73,4 @@ "use strict"; | ||
_this.setRectangleCallback = function () { | ||
if (_this.state.rectangle !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.rectangle | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.rectangle); | ||
} | ||
if (_this.state.rectangle !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.rectangle); | ||
} | ||
@@ -86,0 +77,0 @@ }; |
@@ -52,13 +52,4 @@ "use strict"; | ||
_this.setHeatmapLayerCallback = function () { | ||
if (_this.state.heatmapLayer !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.heatmapLayer | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.heatmapLayer); | ||
} | ||
if (_this.state.heatmapLayer !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.heatmapLayer); | ||
} | ||
@@ -65,0 +56,0 @@ }; |
@@ -46,9 +46,2 @@ "use strict"; | ||
_this.state.kmlLayer.setMap(_this.context); | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.kmlLayer | ||
}); | ||
if (_this.props.onLoad) { | ||
@@ -55,0 +48,0 @@ _this.props.onLoad(_this.state.kmlLayer); |
@@ -11,5 +11,2 @@ /// <reference types="googlemaps" /> | ||
export declare class BicyclingLayer extends React.PureComponent<BicyclingLayerProps, BicyclingLayerState> { | ||
static defaultProps: { | ||
onLoad: () => void; | ||
}; | ||
static contextType: React.Context<google.maps.Map | null>; | ||
@@ -16,0 +13,0 @@ state: { |
@@ -28,3 +28,5 @@ "use strict"; | ||
_this.state.bicyclingLayer.setMap(_this.context); | ||
_this.props.onLoad(_this.state.bicyclingLayer); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.bicyclingLayer); | ||
} | ||
} | ||
@@ -54,5 +56,2 @@ }; | ||
}; | ||
BicyclingLayer.defaultProps = { | ||
onLoad: function () { } | ||
}; | ||
BicyclingLayer.contextType = map_context_1.default; | ||
@@ -59,0 +58,0 @@ return BicyclingLayer; |
@@ -45,9 +45,2 @@ "use strict"; | ||
if (_this.state.trafficLayer !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.trafficLayer | ||
}); | ||
if (_this.props.onLoad) { | ||
@@ -54,0 +47,0 @@ _this.props.onLoad(_this.state.trafficLayer); |
@@ -49,6 +49,4 @@ "use strict"; | ||
_this.setGroundOverlayCallback = function () { | ||
if (_this.state.groundOverlay !== null) { | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.groundOverlay); | ||
} | ||
if (_this.state.groundOverlay !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.groundOverlay); | ||
} | ||
@@ -55,0 +53,0 @@ }; |
@@ -50,6 +50,4 @@ "use strict"; | ||
_this.setAutocompleteCallback = function () { | ||
if (_this.state.autocomplete !== null) { | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.autocomplete); | ||
} | ||
if (_this.state.autocomplete !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.autocomplete); | ||
} | ||
@@ -56,0 +54,0 @@ }; |
@@ -38,13 +38,4 @@ "use strict"; | ||
_this.setSearchBoxCallback = function () { | ||
if (_this.state.searchBox !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.searchBox | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.searchBox); | ||
} | ||
if (_this.state.searchBox !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.searchBox); | ||
} | ||
@@ -51,0 +42,0 @@ }; |
@@ -67,13 +67,4 @@ "use strict"; | ||
_this.setStreetViewPanoramaCallback = function () { | ||
if (_this.state.streetViewPanorama !== null) { | ||
_this.registeredEvents = helper_1.applyUpdatersToPropsAndRegisterEvents({ | ||
updaterMap: updaterMap, | ||
eventMap: eventMap, | ||
prevProps: {}, | ||
nextProps: _this.props, | ||
instance: _this.state.streetViewPanorama | ||
}); | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.streetViewPanorama); | ||
} | ||
if (_this.state.streetViewPanorama !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.streetViewPanorama); | ||
} | ||
@@ -80,0 +71,0 @@ }; |
@@ -26,6 +26,4 @@ "use strict"; | ||
_this.setStreetViewServiceCallback = function () { | ||
if (_this.state.streetViewService !== null) { | ||
if (_this.props.onLoad) { | ||
_this.props.onLoad(_this.state.streetViewService); | ||
} | ||
if (_this.state.streetViewService !== null && _this.props.onLoad) { | ||
_this.props.onLoad(_this.state.streetViewService); | ||
} | ||
@@ -32,0 +30,0 @@ }; |
export declare function setKey(key: string): void; | ||
export declare function getKey(): string | null; | ||
export declare function getKey(): string; | ||
//# sourceMappingURL=docs-api-key.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var googleMapKey_1 = require("./googleMapKey"); | ||
var KEY_NAME = "react-google-maps-api-key"; | ||
@@ -9,4 +10,4 @@ function setKey(key) { | ||
function getKey() { | ||
return window.sessionStorage.getItem(KEY_NAME); | ||
return googleMapKey_1.default || window.sessionStorage.getItem(KEY_NAME); | ||
} | ||
exports.getKey = getKey; |
{ | ||
"name": "@react-google-maps/api", | ||
"version": "1.2.0-alpha.12", | ||
"version": "1.2.0-alpha.13", | ||
"description": "React.js Google Maps API integration", | ||
@@ -71,4 +71,4 @@ "license": "MIT", | ||
"lint": "npx eslint ./src/**/*.{ts,tsx}", | ||
"publish": "npm run build && npm publish .", | ||
"publish:next": "npm run build && npm publish . --tag next", | ||
"publish": "yarn build && npm publish .", | ||
"publish:next": "yarn build && npm publish . --tag next", | ||
"docs:dev": "npx styleguidist server", | ||
@@ -75,0 +75,0 @@ "docs:build": "npx styleguidist build", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179
324783
7148