Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting to Lat/Lng? #29

Closed
acomito opened this issue May 9, 2016 · 3 comments
Closed

Getting to Lat/Lng? #29

acomito opened this issue May 9, 2016 · 3 comments

Comments

@acomito
Copy link

acomito commented May 9, 2016

When I console log the following, I am not getting anything... it says

function (){return a}

    this.autorun(function () {
        if (GoogleMaps.loaded()) {
            $("#Location_Input")
                .geocomplete()
                .bind("geocode:result", function(event, result){
                    console.log(result.geometry.location.lat);
                });
        }
    });

Everything else the input returns (that isn't in an object) returns fine.

@acomito acomito changed the title Can't be stored in a session variable? Getting to Lat/Lng? May 9, 2016
@acomito
Copy link
Author

acomito commented May 9, 2016

covered here: #7

@jshimko
Copy link
Owner

jshimko commented May 9, 2016

result.geometry.location.lat is a function.

@jshimko
Copy link
Owner

jshimko commented May 9, 2016

this.autorun(function () {
  if (GoogleMaps.loaded()) {
    $("#Location_Input")
      .geocomplete()
      .bind("geocode:result", function(event, result){
        const lat = result.geometry.location.lat();
        const lng = result.geometry.location.lng();

        console.log('Latitude: ', lat);
        console.log('Longitude: ', lng);
      });
  }
});

@jshimko jshimko closed this as completed May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants