Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-geosuggest-updated

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-geosuggest-updated - npm Package Compare versions

Comparing version 2.3.7 to 2.3.8

49

module/Geosuggest.js

@@ -380,2 +380,11 @@ 'use strict';

suggests = suggests.map(function (suggest) {
var data = _this3.geocode(suggest);
console.log(data);
var newSuggest = suggest;
newSuggest.gmaps = data.gmaps;
newSuggest.location = data.location;
return newSuggest;
});
console.log(suggests);
this.props.getSuggests(suggests);

@@ -508,3 +517,39 @@ activeSuggest = this.updateActiveSuggest(suggests);

}
}, {
key: 'geocode',
value: function geocode(suggest) {
var _this5 = this;
var options = null;
if (suggest.placeId && !suggest.isFixture) {
options = {
placeId: suggest.placeId
};
} else {
options = {
address: suggest.label,
location: this.props.location,
bounds: this.props.bounds,
componentRestrictions: this.props.country ? { country: this.props.country } : null
};
}
var data = {
gmaps: null,
location: {}
};
this.geocoder.geocode(options, function (results, status) {
if (status === _this5.googleMaps.GeocoderStatus.OK) {
var gmaps = results[0],
location = gmaps.geometry.location;
data.gmaps = gmaps;
data.location = {
lat: location.lat(),
lng: location.lng()
};
}
});
return data;
}
/**

@@ -518,3 +563,3 @@ * Render the view

value: function render() {
var _this5 = this;
var _this6 = this;

@@ -526,3 +571,3 @@ var attributes = (0, _filterInputAttributes2.default)(this.props),

ref: function ref(i) {
return _this5.input = i;
return _this6.input = i;
},

@@ -529,0 +574,0 @@ value: this.state.userInput,

2

package.json
{
"name": "react-geosuggest-updated",
"version": "2.3.7",
"version": "2.3.8",
"description": "A React autosuggest for the Google Maps Places API.",

@@ -5,0 +5,0 @@ "main": "module/Geosuggest.js",

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