javascript - How to use Angular Js with Google Maps To render a people list when clicking on a marker? -


i using angular js v1 , need render list of people when click on marker on map , need marker have number on , number indicator number of people country , when click marker on map , list same number marker appears below

similar website http://www.travelgirls.com/trips/

here example hope helps you. if not improve answer later on (i have not time now)

<ui-gmap-google-map center='map.center' zoom='map.zoom'>     <ui-gmap-markers models="markers" coords="'self'" options="markeroptions" events="markerevents" icon="'icon'"></ui-gmap-markers>     <ui-gmap-window coords="model.selectedmarker" show="model.selectedmarker.show" templateurl="'/app/controls/gmapscontrol/mapinfowindow.html'" templateparameter="model.selectedmarker" closeclick="model.closeinfowindow(model)" isiconvisibleonclick="false"></ui-gmap-window> </ui-gmap-google-map> 

/app/controls/gmapscontrol/mapinfowindow.html':

<div>     <h5>{{parameter.title}}</h5>     <h6>affected devices</h6>     <ul>         <li ng-repeat="device in parameter.control">             <span class="clickable-device" ui-sref="main.details({id: device.id})">{{device.name}}</span>         </li>     </ul> </div> 

this infowindow showing list of devices on marker click. possible route site when selecting device rendered list.

parameter selectedmarker passed on templateparameter , parameter.control therefore device list. devicelist attached every marker model. yeah... maybe not greatest solution fine our use case


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -