Hi, I’m taking the geolocalizacion only for tests in this way:
var onSuccess = function(position) {
var mapOptions = {
center: new google.maps.LatLng(position.coords.latitude,position.coords.longitude ),
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"),
mapOptions);
// Stop the side bar from dragging when mousedown/tapdown on the map
google.maps.event.addDomListener(document.getElementById('map'), 'mousedown', function(e) {
e.preventDefault();
return false;
});
$scope.map = map;
};
function onError(error) {
alert('code: ' + error.code + '\n' +
'message: ' + error.message + '\n');
}
navigator.geolocation.getCurrentPosition(onSuccess, onError);
This works well for me but I would mark within map the address. Anyone know how I can get it?
Thanks!