Ploum Ploum - 11 months ago 96
Javascript Question

Google Maps API - Link to place detail page

I have a custom Google Maps where marker are populate dynamically and I try to redirect the marker link to the corresponding place details' page on Google Maps. For example, on marker click, I would like to open a new window to this link :,6.236581,17z/data=!3m1!4b1!4m2!3m1!1s0x478c372f7df47135:0xff206d31a973eded

For now, I am able to redirect to the address, but it does not show the full Google My Business panel like on my previous link. Any ideas ?

Here is my code :

function initMap() {
var myLatlng = new google.maps.LatLng(agence[0], agence[1]);
var map = new google.maps.Map(document.getElementById('maps'), {
center: myLatlng,

var infowindow = new google.maps.InfoWindow();
var service = new google.maps.places.PlacesService(map);

placeId: 'ChIJ71BChS4ujEcRclm9twk3Y04'
}, function(place, status) {
if (status === google.maps.places.PlacesServiceStatus.OK) {
var marker = new google.maps.Marker({
map: map,
position: place.geometry.location,
url: ''+place.formatted_address
google.maps.event.addListener(marker, 'click', function() {
infowindow.setContent(;, this);;
google.maps.event.addDomListener(window, 'load', initMap);

Thanks for your help


look this part

url: ''+place.formatted_address

google cannot locate this company in this way

change to

url: place.url

I think this is what you want