Skip to content

A meteor package to geocode an address into full address and lat lng coordinates.

License

Notifications You must be signed in to change notification settings

baberuth22/google-geocode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Address to full address

Calls Googles reverse geocode API converting address to full address and lat lng coordinates

install

meteor add baberuth22:google-geocode

Usage

Convert zipcode to address Returns whole data from Google API. Check below for tidy outputs

var zipcode = 93109;
geocode.getLocation(zipcode, function(location){

	//location is straight output from Google
	//or you can now access it from geocode object
	Session.set('location', geocode.getAddrStr());
});

Use this if you are using https

var zipcode = 93109;
geocode.getSecureLocation(zipcode, function(location){

  //location is straight output from Google
  //or you can now access it from geocode object
  Session.set('location', geocode.getAddrStr());
});

Data is accessible from

geocode.data

Format address as an Object

geocode.getAddrObj()

Format address as a String

geocode.getAddrStr()

Get postal code

geocode.getPostalCode()

About

A meteor package to geocode an address into full address and lat lng coordinates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published