This repository is not actively developed please use dburles:google-maps
https://github.com/dburles/meteor-google-maps/ as it's supported and contains many more features than this.
Google Maps repackaged for Meteor.
- make sure you have meteorite installed
$ npm install -g meteorite
- inside your project, run:
$ mrt add googlemaps
This is not server code. You should only be working with GoogleMaps within your client files.
GoogleMaps has only one method, init
. That takes two arguments a list of loading parameters & a callback called when google maps is loaded.
GoogleMaps.init(
{
'sensor': true, //optional
'key': 'MY-GOOGLEMAPS-API-KEY', //optional
'language': 'de' //optional
},
function(){
var mapOptions = {
zoom: 13,
mapTypeId: google.maps.MapTypeId.SATELLITE
};
map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
map.setCenter(new google.maps.LatLng( 35.363556, 138.730438 ));
}
);
Please feel free to make pull requests and submit issues here. Thanks!