listeners: {
maprender: function (comp, map) {
var image = '/images/iconmarker.png';
data = Navigator.store.Contacts;
for (var i = 0, ln = data.data.length; i < ln; i++) {
addMarkers(data.data.items[i], image);
}
var addMarkers = function (data, image) {
var latLng = new google.maps.LatLng(data.get('latitude'), data.get('longitude'));
var marker1 = new google.maps.Marker({
map: map.map,
position: latLng,
icon: image
});
google.maps.event.addListener(marker1, 'click', function () {
infowindow.open(map, marker1);
//marker1.setPostion(latLng);
In the above code fragment i have specified the code to plot the markers from json data, but i do not get any thing displayed on the map.Once the markers are plotted i need to facilitate tap on the markers and determine the directions to go to the marker tapped from my current location.Could you please provide some help regarding the same.