I am trying to place a marker into Google Maps using its PlaceID. I have the map working and displaying and can also add markers (using Lattitude and Longitude) into it.
The code below is what I am using to try and make the marker display using its placeID however it is not displaying.
function addPlaces(){
var marker = new google.maps.Marker({
place: new google.maps.Place('ChIJN1t_tDeuEmsRUsoyG83frY4'),
map: map
});
}
This function is called after the map has loaded.
google.maps.event.addDomListener(window, "load", addPlaces);
If you want to place a marker on the map at the place with the place_id: 'ChIJN1t_tDeuEmsRUsoyG83frY4', you need to make a getDetails request to the PlaceService
proof of concept fiddle
code snippet: