Styling InfoWindow - Adding a table
I have a list of markers, which denote assets. We pre-organize the markers such that, all assets with the same lat-long will be merged and their names will be concatenated (comma delimited). Now, my implementation :
<ui-gmap-marker coords="{latitude : marker.latitude, longitude : marker.longitude}" options="{ icon : marker.icon }" events="{}" idkey="marker.id" ng-click="markerCLick(coords)" ng-repeat='marker in markerList'>
<ui-gmap-window idkey="marker.id" options="windowOptions" closeClick="closeClick()">
<div>{{ marker.resourceName }}</div>
</ui-gmap-window>
</ui-gmap-marker>
The Marker :
{
id : 1,
name : "Asset 1, Asset 5, Asset 6, Asset 8",
latitude : XX.XXX,
longitude : YY.YYYY
},{
id : 2,
name : "Asset 2",
latitude : XX.XXX1,
longitude : YY.YYYY2
}
I tried writing a directive <info-window ng-model='marker.resourceName'></info-window>, but marker.resourceName is not binding.
Each asset will have a click event later.
How do I proceed ?
In the ng-click, you will probably need the "$parent" i.e. $parent.markerCLick(coords), to make it working.
I am not sure what you are trying to make with a custom directive. But if you are trying to bind it with your controller, then you have to have a $scope.apply which will start digest cycle and will attach a scope variable with your controller.
If you going to use the