Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ankit Verma
    @ankitv89
    Can anyone point me how to use markerclusterer with this package?
    Shravan Shandilya
    @shravan-shandilya
    Hey guys. How and where do I set google map application key? 3
    down vote
    Google maps requires an API key for new projects since june 2016
    openqubit
    @openqubit
    if (Meteor.isClient) { Meteor.startup(function() { GoogleMaps.load({ key: 'A*************************g' }); }); } or look at this fiddle https://jsfiddle.net/9dgL1t8t/
    Shravan Shandilya
    @shravan-shandilya
    @openqubit Thanks! Will check it out.
    Shravan Shandilya
    @shravan-shandilya
    Its working fine now! Thanks @openqubit
    openqubit
    @openqubit
    @shravan-shandilya You are welcome.
    James Corey
    @mmjames04
    My code looks identical to dburles' example app...any idea why I'm getting this error? insert failed: Method '/markers/insert' not found
    openqubit
    @openqubit
    Have you defined a markers collection Markers = new Mongo.Collection('markers'); If its not that,check your subscriptions and publishing.
    James Corey
    @mmjames04
    Thanks...I've moved onto other tutorials that seem to be working fine. Not sure what was the problem.
    openqubit
    @openqubit
    Oh cool,i am glad it works for you.
    David Burles
    @dburles
    @mmjames04 looks like you haven't defined the collection on the server, only on the client :)
    adamgins
    @adamgins
    hi just upgraded to meteor 1.4.1.1 and iOS 10 and having a problem with maps not showing up (black iframe) on Cordova. Works fine on mobile. I tried //App.accessRule('*.google.com/*'); //App.accessRule('*.googleapis.com/*'); //App.accessRule('*.gstatic.com/*');
    and App.accessRule('.google.com/', { type: 'navigation' } );
    App.accessRule('.googleapis.com/', { type: 'navigation' } );
    App.accessRule('.gstatic.com/', { type: 'navigation' } )
    but no luck. anyone else had this issue?
    adamgins
    @adamgins
    I mean works fine on mobile browser.
    openqubit
    @openqubit
    I have loaded maps using iframes with no issues although compiled versions had a flickering problem(app just flickers). This is the code i am using to load my maps App.accessRule('*');
    App.accessRule('https://*.googleapis.com/*');
    App.accessRule('https://*.google.com/*');
    App.accessRule('https://*.gstatic.com/*');
    App.setPreference('android-targetSdkVersion', '23');
    App.setPreference("WebAppStartupTimeout", 60000); adding startup time will allow maps to load completely.
    David Burles
    @dburles
    @openqubit I think that first accessRule is going to make the others redundant
    openqubit
    @openqubit
    @dburles You are right. I got rid of all the other lines and still works. Thanks.
    Jan Dočekal
    @jdckl
    Anybody here who has experience with the marker clusterer?
    I can't seem to be able to get it working
    adamgins
    @adamgins
    Thanks.
    Yep. Been working that way in my production systems, but struggling to get it it working with 1.4.2 beta
    any ideas welcomo
    openqubit
    @openqubit
    @violetzie Here is an example http://en.proft.me/2016/06/2/how-create-google-map-marker-cluster-meteorjs/ that uses this package https://github.com/oakworks/meteor-marker-clusterer and to cluster i guess you do this GoogleMaps.ready 'myMap', (map) -> markers = [] markerCluster = new MarkerClusterer(map.instance, markers, clusterOptions)
    adamgins
    @adamgins
    @openqubit have you managed to get it working with Xcode8/Cordova. Mine has worked with Xcode 7.
    openqubit
    @openqubit
    @adamgins Yes it has.
    adamgins
    @adamgins
    @openqubit do you have a CSP / BrowserPolicy beyond the App.accessRule examples above, please? I just get a black screen where the iframe is (can't see an error on the console).
    openqubit
    @openqubit
    @adamgins No,i am not using anything beyond what i have above. I think its a problem with your cordova or xcode. I had a hell of a time setting up the sdk's on Xcode (8.0 and 7.3.1 for OS X El Capitan
    adamgins
    @adamgins
    @openqubit thanks. The weird thing is other iFrames (like Youtube) work fine... it's just that maps don't show on Cordova, so seems like something in the security/policy, any thoughts welcome
    adamgins
    @adamgins
    @dburles thanks again for the package... I logged a bit more info here dburles/meteor-google-maps#129 I can't seem to see any other error messages on Cordova, like not being able to access something ... any thoughts welcome
    adamgins
    @adamgins

    OK, I think I know what's happening my `Meteor.startup(function() {

    GoogleMaps.load({ key: '<my key>', libraries: 'places'});

    });` is not running. If I run it manually through Safari console, the map shows up.
    I thought Meteor.startup should only run once Cordova is ready... thoughts?

    adamgins
    @adamgins
    If I move the GoogleMaps.load to the onRendered it works. ..not sure why iOS 10 does not run the startup first?
    David Burles
    @dburles
    @adamgins interesting, I would recommend placing it on an onRendered callback to begin with as startup is really just for examples
    that means you can lazy load the api once it's required
    adamgins
    @adamgins
    @dburles thanks.
    openqubit
    @openqubit
    @adamgins Mine turned out to be a CORS issue so you should also look there.
    Jan Dočekal
    @jdckl
    Another question, I got clusterer working (thx @openqubit ), now I would like to get geolocation marker working, has anyone used that ? (its a separate library, thats supposed to show the users location with a little circle) I have it running but I am getting "geomarker.js:9 - Uncaught ReferenceError: google is not defined", which is weird..
    openqubit
    @openqubit
    @violetzie You're welcome. Check if you have the maps loaded if (Meteor.isClient) { Meteor.startup(function(){ GoogleMaps.load({ key: 'your key' }); }); }
    Jan Dočekal
    @jdckl
    Yea I do have that, I tried moving it to public and using GoogleMaps.loadUtilityLibrary but that resulted in "GeolocationMarker undefined".. so I gave up and created the market the normal way lol
    Jan Dočekal
    @jdckl
    I am struggling with the directions library right now though, seems like nothing is working either
    const directionsService = new GoogleMaps.DirectionsService();
    const directionsDisplay = new GoogleMaps.DirectionsRenderer();
    
    function createRoute(start, end) {
    directionsService.route({
      origin: start,
      destination: end,
      travelMode: google.maps.DirectionsTravelMode.DRIVING
    }, function(response, status) {
      if (status == google.maps.DirectionsStatus.OK) {
        directionsDisplay.setDirections(response);
      } else {
          console.log('Nepovedlo se: ' + status);
        }
    });
    }
    I do have the library on load
    GoogleMaps.load({
    key: Meteor.settings.public.Googlemaps.gmaps,
    libraries: 'directions, geometry'
    });
    the map actually stopped loading
    Jan Dočekal
    @jdckl
    got that to work but now it says "GoogleMaps.DirectionsService is not a constructor" :D
    LelandB
    @LelandB
    Hello, new face here. Does anyone know how to best use Iron Router with this package? I'm trying to split up my directories into a typical Meteor app (with client/ lib/ server/ and public/) but if I hook up a map template html page via {{yield}} my app breaks. Any suggestions?
    David Burles
    @dburles
    @violetzie should be new google.maps.DirectionsService(); and new google.maps.DirectionsRenderer(); also you'll want to create those once the map has loaded (most likely within GoogleMaps.ready(...)
    David Burles
    @dburles
    @LelandB if possible, I'd recommend using flow router instead as iron router is no longer maintained. here's an example you can check out https://github.com/dburles/map-bug-58 for a working example
    openqubit
    @openqubit
    This message was deleted
    openqubit
    @openqubit
    How can i go to specific point on the map onClick?.