html - Showing Markers on Gmap by using a checkbox filter AngularJS -
so i'm trying show markers database, using checkboxes. checked aswers here, none easy adapt project, i'm requesting help. problem - want show location, depending on type(lets typeclient), , on checkboxes there types(namefonction) stored on table. when check checkbox, must show clients has specific type.
here html code:
<html ng-app="crudapp"> <head> <title>simle map</title> <meta name="description" content="simple map"> <meta name="keywords" content="ng-map,angularjs,center"> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script src="https://maps.google.com/maps/api/js?key=yourkey &libraries=placeses,visualization,drawing,geometry,places"></script> <script src="https://code.angularjs.org/1.3.15/angular.js"></script> <script src="js/ng-map.js"></script> <!--script src="ng-map.js"></script--> <!--script src="app.js"></script--> <script src="js/maps.js"></script> </head> <!--body ng-controller="mapctrl"--> <body ng-controller="dbcontroller"> <div > <div id="gmap"> <ng-map center="{{currentlocation}}" zoom="15"> <marker position="{{currentlocation}}" icon='https://cdn2.iconfinder.com/data/icons/flat-style-svg-icons-part-1/512/location_marker_pin-64.png'> </marker> <marker ng-repeat="client in clients" position="{{client.locationclient}}" id="{{client.idclient}}" > <info-window id="myinfowindow"> <div ng-non-bindable> <h4>{{selectedclient.nameclient}}</h4> </div> </info-window> </marker> </ng-map> <br> <b>liste des fonctions</b><br> <div class="filterclient"> <li ng-repeat="fonction in fonctions" > <label> <input type="checkbox" name="more_filter[]" value="{{fonction.namefonction}}" >{{fonction.namefonction}}<br> </label> </li> <button ng-click="filter();">submit</button> </div> <br> </body> </html>
and here js part. still don't know how make filter() function.
$scope.filter = function() {//still don't know }
thank helping, i'm noobie angularjs
Comments
Post a Comment