Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 793 Bytes

File metadata and controls

41 lines (27 loc) · 793 Bytes

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.