Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anders Brohus 194 posts 475 karma points
    Aug 25, 2016 @ 10:59
    Anders Brohus
    1

    Cannot read property "location" of undefined

    Hi!

    I get this error when i try search for a new place

    Uncaught TypeError: Cannot read property 'location' of undefined on

    $scope.map.control.getGMap().panTo(place.geometry.location);
    

    In the AGM.js file...

    I'm using it inside a LeBlender window

  • Jonathan Richards 288 posts 1742 karma points MVP
    Aug 25, 2016 @ 14:58
    Jonathan Richards
    0

    Hi Anders,

    I have just doubled checked that search works normally in the latest version of AGM including when it is placed within Archetype and Nested Content. Success.

    I installed LeBlender via NuGet, and that in itself didn't stop AGM functioning. Success.

    I then thought about using LeBlender and then realised it has something to do with the Grid Control, which is something I don't use. I looked at the text and screenshots and have no idea what it does. Personal fail this end.

    I remember that some of these packages use directives that can be used by other packages (See https://our.umbraco.org/projects/backoffice-extensions/angulargooglemaps/bugs/78902-error-no-controller-ngmodel-when-creating-a-data-type-with-v201), so I checked the directives used by LeBlender. No issues there. Though note to anyone reading this that writes packages, you may want to stop using directives, as they might clash with other packages.

    1. But, I do have a thought, maybe all this is a red herring and the place you are searching for has no geometry. Can you tell me the place you are searching for ?

    2. Also, did you switch on Google Places API Web Service in the Google Console ? (This allows you to use geometry - maybe I should make this clearer in the instructions)

    Google Console

    Otherwise, if it ain't that, you might have to wait a bit before I can investigate this issue, sorry for this.

    Cheers

    Jonathan

  • Kristian Andersen 8 posts 99 karma points
    Sep 27, 2016 @ 14:54
    Kristian Andersen
    0

    Hi Anders,

    Did you manage to solve this. I get the exact same error with angulargooglemaps in archetype, in leblender :)

Please Sign in or register to post replies

Write your reply to:

Draft