angular-geocode

1.0.1 • Public • Published

angular-geocode

AngularJS geocoding directive and provider. Allows to do forward and reverse geocoding. With google maps. Look at example and tests.

<div ng-controller="Geo">
    <input type="text" ng-model="geo.name" ng-model-options="{debounce: 1000}" coordinates="geo.latLng" address="geo.name" geocode />
    <input type="number" ng-model="geo.latLng.lat" ng-model-options="{debounce: 1000}" />
    <input type="number" ng-model="geo.latLng.lng" ng-model-options="{debounce: 1000}" />
</div>
geocodef.toAddress(latLng).then(function (address) {
    $scope.address = address;
    ignoreChange.address = true;
});
geocodef.toLatLng(address).then(function (latLng) {
    $scope.coordinates = latLng;
    ignoreChange.coordinates = true;
});

Author

Oleksandr Knyga oleksandrknyga@gmail.com

Readme

Keywords

none

Package Sidebar

Install

npm i angular-geocode

Weekly Downloads

3

Version

1.0.1

License

ISC

Last publish

Collaborators

  • oleksandrknyga