4
I’m developing a responsive website and using the Google Maps API to generate the company location map.
I would like when the usurer was accessing the site by a mobile device and the same clicked on the map or even a link, was redirected to the Google Maps application and transfer the route, so he would not need to enter the address and search.
var myCenter = new google.maps.LatLng(-7.0995734, -34.8410316);
function initialize()
{
var mapProp = {
center: myCenter,
zoom: 16,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
var marker = new google.maps.Marker({
position: myCenter,
});
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
Marcos, take a look at my question, I added my code, please see where I can put this line of code you mentioned
– Sérgio Machado
edited the reply @Sérgiomachado da uma olhada ai
– Marcos Henrique
I know the code, open the map but open without coordinates, so I did another search on the internet and found the solution: $("#Googlemap"). on('click', Function() { window.Location = "http://maps.google.com/? q=Implantare+Soluções+em+Odontologia/"; });
– Sérgio Machado
if it worked at all
– Marcos Henrique