angularjs - Multiple infowindows redirect to templates ionic -
i new ionic , building app has google map template multiple markers.
how can redirect infowindows different , unique templates of app?
here code. have see solutions nothing working me.
thanks in advance
.controller('rdmctrl', function($scope, $state, $cordovageolocation) { var options = {timeout: 10000, enablehighaccuracy: true}; $cordovageolocation.getcurrentposition(options).then(function(position){ var latlng = new google.maps.latlng(position.coords.latitude, position.coords.longitude); var locations = [ ['porto studios', 38.1521374,23.2270006, 6], ['mellisa hotel', 38.0450982,23.5390992, 5], ['elefsina hotel' , 38.048490, 23.540285, 4], ['Ειδύλιον hotel', 38.1659738,23.336649, 3], ['Βερόρι hotel', 38.1678945,23.3292679, 2], ['here am', position.coords.latitude, position.coords.longitude, 1] ]; var map = new google.maps.map(document.getelementbyid('map1'), { zoom: 16, center: latlng, maptypeid: google.maps.maptypeid.roadmap }); var infowindow = new google.maps.infowindow(); var marker, i; (i = 0; < locations.length; i++) { marker = new google.maps.marker({ position: new google.maps.latlng(locations[i][1], locations[i][2]), map: map }); google.maps.event.addlistener(marker, 'click', (function(marker, i) { return function() { infowindow.setcontent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); }
Comments
Post a Comment