Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.
This repository was archived by the owner on May 25, 2019. It is now read-only.

Support for tilesloaded? #16

@LIDJungle

Description

@LIDJungle

I need to do geocoding on a map object, and as best I could see, there is no support for "addListenerOnce" and/or the tilesloaded event.

It was trivial to add it. And yes, I know this is NOT elegant. :)

  function bindMapEvents(scope, eventsStr, googleObject, element) {
  // Jason's hack. This makes the "ready" function fire on map load.
      google.maps.event.addListenerOnce(googleObject, 'tilesloaded', function() {
        scope.ready();
      });
    angular.forEach(eventsStr.split(' '), function (eventName) {
     ...
    }
  }

In the controller:

/* ready() is a custom definition that I added to the ui-map code.
   It sets up a one time listener that will run on 'tilesloaded' */
$scope.ready = function() {
    $scope.getCoords($scope.address1 + " " + $scope.city + " " + $scope.selectedState + " " + $scope.zip);
};

Not a show stopper, just an FYI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions