Socket
Socket
Sign inDemoInstall

@dotdev/reactive-google-map

Package Overview
Dependencies
Maintainers
12
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotdev/reactive-google-map - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

package/hook/autocomplete.d.ts

5

package.json
{
"name": "@dotdev/reactive-google-map",
"version": "1.0.5",
"version": "1.1.0",
"main": "package/index.js",

@@ -24,3 +24,4 @@ "types": "package/index.d.ts",

"react": "^16.8.3",
"react-dom": "^16.8.3"
"react-dom": "^16.8.3",
"use-places-autocomplete": "^1.9.3"
},

@@ -27,0 +28,0 @@ "files": [

1

package/component/google-map-autocomplete.js

@@ -67,2 +67,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.GoogleMapAutocomplete = void 0;
var React = require("react");

@@ -69,0 +70,0 @@ var utility_1 = require("../utility");

@@ -13,12 +13,12 @@ /**

toggleCluster: (enabled?: boolean) => void;
createMarker: (marker: GoogleMap.Marker<any>) => any;
markersAdd: (markers: GoogleMap.Marker<any>[]) => void;
markersRemove: (markerIds: string[]) => void;
createMarker: (marker: GoogleMap.Marker) => any;
markersAdd: (markers: Array<GoogleMap.Marker>) => void;
markersRemove: (markerIds: Array<string>) => void;
markersClear: () => void;
compareMarkers: (markerA: any, markerB: any) => boolean;
compareMarkers: (markerA: GoogleMap.Marker | any, markerB: GoogleMap.Marker | any) => boolean;
markersSync(): void;
markerAdd: (marker: GoogleMap.Marker<any>) => void;
markerAdd: (marker: GoogleMap.Marker) => void;
markerRemove: (markerId: string) => void;
/** Uses [[GoogleMap.infowindowClose]] method before calling Google Infowindow `open()` method */
infowindowOpen: (marker: GoogleMap.Marker<any>) => Promise<void>;
infowindowOpen: (marker: GoogleMap.Marker) => Promise<void>;
/** Uses Google Infowindow `close()` method */

@@ -25,0 +25,0 @@ infowindowClose: () => void;

@@ -67,2 +67,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.GoogleMap = void 0;
var React = require("react");

@@ -69,0 +70,0 @@ var ReactDOMServer = require("react-dom/server");

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./google-map"));
__export(require("./google-map-autocomplete"));
__exportStar(require("./google-map"), exports);
__exportStar(require("./google-map-autocomplete"), exports);
//# sourceMappingURL=index.js.map
export * from "./component";
export * from "./hook";
export { Bounds, Geocoder } from "./utility";
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./component"));
__exportStar(require("./component"), exports);
__exportStar(require("./hook"), exports);
var utility_1 = require("./utility");
exports.Bounds = utility_1.Bounds;
exports.Geocoder = utility_1.Geocoder;
Object.defineProperty(exports, "Bounds", { enumerable: true, get: function () { return utility_1.Bounds; } });
Object.defineProperty(exports, "Geocoder", { enumerable: true, get: function () { return utility_1.Geocoder; } });
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bounds = void 0;
var Bounds = /** @class */ (function () {

@@ -4,0 +5,0 @@ function Bounds() {

@@ -5,2 +5,3 @@ /**

*/
import { Bounds } from "../utility";
export declare class Geocoder {

@@ -13,2 +14,6 @@ options: Geocoder.Options;

browserToLatLng: (options?: PositionOptions) => Promise<Geocoder.Position>;
placeToGeometry: (placeId: string) => Promise<{
location: Geocoder.Position;
viewport: Bounds.Rect;
}>;
static latLngToDirections: (destination: Geocoder.Position, origin?: string) => string;

@@ -15,0 +20,0 @@ }

@@ -43,2 +43,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Geocoder = void 0;
var use_places_autocomplete_1 = require("use-places-autocomplete");
var utility_1 = require("../utility");

@@ -106,2 +108,21 @@ var Geocoder = /** @class */ (function () {

};
this.placeToGeometry = function (placeId) { return __awaiter(_this, void 0, void 0, function () {
var place;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, use_places_autocomplete_1.getDetails({
placeId: placeId,
})];
case 1:
place = _a.sent();
return [2 /*return*/, {
location: {
lat: place.geometry.location.lat(),
lng: place.geometry.location.lng(),
},
viewport: utility_1.Bounds.simplifyBounds(place.geometry.viewport),
}];
}
});
}); };
}

@@ -108,0 +129,0 @@ Geocoder.InjectGoogleMapsWithGeocoder = function (googleMapsApiVersion, googleMapsApiKey) { return __awaiter(void 0, void 0, void 0, function () {

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./inject-script"));
__export(require("./geocoder"));
__export(require("./bounds"));
__exportStar(require("./inject-script"), exports);
__exportStar(require("./geocoder"), exports);
__exportStar(require("./bounds"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InjectScript = void 0;
exports.InjectScript = function (src) {

@@ -4,0 +5,0 @@ var existingScript = document.querySelectorAll("head script[src=\"" + src + "\"]");

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc