Angularjs ui-gmap-window object data not showing
I have a problem with my ui-gmap-window in angularjs too. The problem is getting the object data in the window as it doesn't seem to render.
this is my allowance:
<ui-gmap-window coords="selectedmarker.coords" options="windowOptions" closeClick="closeClick()" show="windowOptions.show">
<div style="overflow: auto; width: 300px;">
<h2 style="font-size: 12px">{{selectedmarker.title}}</h2>
<h2 style="font-size: 12px">ADRESS:</h2>
<span>{{selectedmarker.addressStreet}}</span>
<br/>
<span>{{selectedmarker.addressZip + ' ' + selectedmarker.addressCity}}</span><br/>
<span>{{'Telefon: ' + selectedmarker.phoneNumber}}</span><br/>
<span>{{'E-postadress: ' + selectedmarker.email}}</span>
<h2 style="font-size: 12px">Γ
TERFΓRSΓLJARE AV:</h2>
<span>{{selectedmarker.products}}</span>
</div>
</ui-gmap-window>
<ui-gmap-markers click="'onClick'" models="retailersService.foundRetailers.retailers" coords="'coords'" icon="'icon'" idKey="id">
</ui-gmap-markers>
and this is my angular:
$scope.selectedmarker = {};
$scope.onClick = function (data) {
$scope.windowOptions.show = !$scope.windowOptions.show;
$scope.selectedmarker = data;
};
//call the on-click-funcionality with my collection of objects.
$scope.addMarkerClickFunction(mycollection);
//On-click-functionality
$scope.addMarkerClickFunction = function (mycollection) {
angular.forEach(mycollection, function (value, key) {
value.onClick = function () {
$scope.onClick(value);
};
});
};
When I console.log my "Selectedmarker" object, it has all the data it should have. however nothing shows up in my u-gmap window.
Does anyone know what I am doing wrong here?
+3
source to share