Socket
Socket
Sign inDemoInstall

react-geosuggest

Package Overview
Dependencies
36
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

2

bower.json
{
"name": "geosuggest",
"version": "1.1.0",
"version": "1.2.0",
"description": "A React autosuggest for the Google Maps Places API.",

@@ -5,0 +5,0 @@ "main": "dist/geosuggest.min.js",

{
"name": "react-geosuggest",
"version": "1.1.0",
"version": "1.2.0",
"description": "A React autosuggest for the Google Maps Places API.",

@@ -5,0 +5,0 @@ "main": "src/Geosuggest.jsx",

@@ -78,5 +78,10 @@ # React Geosuggest

Gets triggered when a suggest got selected. Only parameter is the selected suggest.
Gets triggered when a suggest got selected. Only parameter is an object with data of the selected suggest. This data is available:
* `label` – Type `String` – The label name
* `placeId` – Type `String` – If it is a preset, equals the `label`. Else it is the Google Maps `placeID`
* `location` – Type `Object` – The location containing `lat` and `lng`
* `gmaps` – Type `Object` – *Optional!* The complete response when there was a Google Maps geocode necessary (e.g. no location provided for presets). [Check the Google Maps Reference](https://developers.google.com/maps/documentation/javascript/reference#GeocoderResult) for more information on it’s structure.
### Example

@@ -83,0 +88,0 @@

@@ -192,4 +192,2 @@ var React = require('react'),

geocodeSuggest: function(suggest) {
var location;
this.state.geocoder.geocode(

@@ -202,4 +200,6 @@ {address: suggest.label},

location = results[0].geometry.location;
var gmaps = results[0],
location = gmaps.geometry.location;
suggest.gmaps = gmaps;
suggest.location = {

@@ -206,0 +206,0 @@ lat: location.lat(),

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc