Sorry, I copied the above code but the marker does not display. Anything missing? Thanks!
var newLat = localStorage.getItem("lat");
var newLng = localStorage.getItem("long");
var myLatLng = new google.maps.LatLng(newLat, newLng);
var mapOptions = {
zoom: 15,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var marker = new google.maps.Marker({
position: myLatLng,
title: "My Location"
});
var infowindow = new google.maps.InfoWindow({
content: 'Hello'
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(Tiggr("googleMap").gmap, marker);
});
Tiggr("googleMap").options.mapElement.gmap('addMarker', marker);
Tiggr("googleMap").options.mapElement.gmap(mapOptions);
Tiggr("googleMap").options.mapElement.gmap("refresh");