0.1.6 • Published 7 years ago
geo-targeting-component v0.1.6
Geo targeting component for angular 1.6.x
Example:
You can see example in ./docs/ (https://ivagafonov.github.io/geoTargetingComponent/)
Setup:
Install with npm
npm install geo-targeting-component --save
Install with bower
bower install geo-targeting-component --save
Usage:
- Add require module:
angular.module('app', ['geoTargetingModule'])
- Add html component and resolve 'model' dependency
<geo-targeting-component model="$ctrl.model" options="$ctrl.options"></geo-targeting-component>
- Create geo targeting model in parent controller
var vm = this;
vm.model = {}
vm.options = {
coordinates: [
37.64,
55.76
],
address: 'Волгоград триумфальная 13',
object: {
geometry: {
type: 'Circle',
radius: 7
},
properties: {
hintContent: "Подвинь меня"
}
},
onInit: function () {
console.log('init');
}
};
Time targeting model
- coordinates - lat, lon float coordinates of circle
- address - calculated address
- radius - radius (int km)
Time targeting options: