Skip to content

hculap/geolocation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Geolocation - Meteor Smart Package

A package that provides geolocation object for meteor.

Installation

Just use your meteorite and type:

mrt add Geolocation

You can use it in your non-meteor projects, just copy geoocation.js file.

How to use?

Firs create geolocation object (Geolocation class is singleton!):

var geo = Golcation.getInstance();

To access latitude and longitude use:

var latitude = geo.lat;
var longitude = geo.lng;

If there are some errors you can find them in error field:

geo.error;

To get new geolocattion coordinates just type:

geo.localize();

!Remember not all browsers supports geolocation!

License

Geollocation is licensed under the MIT license.

About

A package that provides geolocation object

Resources

Stars

Watchers

Forks

Packages

No packages published