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
- Add html component and resolve 'model' dependency
- Create geo targeting model in parent controller
var vm = this; vmmodel = {} vmoptions = coordinates: 3764 5576 address: 'Волгоград триумфальная 13' object: geometry: type: 'Circle' radius: 7 properties: hintContent: "Подвинь меня" { console; };
Time targeting model
- coordinates - [lat, lon] float coordinates of circle
- address - calculated address
- radius - radius (int [km])
Time targeting options:
- coordinates - [lat, lon] float coordinates of circle (low init priority);
- address - address (high init priority)
- object.geometry.type - 'Circle'
- object.geometry.radius - radius (int [km])
- object.properties.hintContent - title of object
- onInit: callback call when component init