New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

raw-google-geocoder

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raw-google-geocoder

raw google geocode any address without an api or key

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

Raw Google Geocoder

npm tests

npm i raw-google-geocoder

Lost your google maps api key? No worries, this tiny module helps you parse and serialize queries straight from google.com/search. Works good with addresses in latin.

If the build is starting to fail, that means the the schema has changed and the query/regex needs to be updated, send a pull request.

var request = require('request')
var geocoder = require('raw-google-geocoder')

//object w/ url passed to the request module.
var use_https = false
var query_object = geocoder.serialize('RUA PAULINA ISABEL DE QUEIROS,, BANGU, SANTO ANDRE, 09210260, br',use_https)


//make a request with request module
request(query,function(error,res,body){

	//parse the body and extract address and gps coordinates, make sure to catch any errors for bad addresses
	try{
		console.log geocoder.parse(body)
	}catch(error){
		console.error error
	}
	/*
	addr: 'R. Paulina Isabel de Queirós - Bangú, Santo André - SP, Brazil',
	lat: -23.6418355,
	lon: -46.5262411
	*/	
})

Keywords

google

FAQs

Package last updated on 22 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts