I want to open an info box of a marker automatically by given marker's id.
//Data of markers are from JSON
var markers = new google.maps.Marker({
id: place.id,
map: map,
title:place.title,
icon : 'assets/frontend/images/marker.png'
});
infoWindow = new google.maps.InfoWindow();
infoWindow.open(map, markers);
For example, Assuming that I want to open info box of marker that has id = 243
var marker_id = 243;
You can use
google-maps-utility-library-v3
for infobox, modify your code as following, if you have multiple markers and need multiple info box according to the markers, you can repeat the code for theinfobox
, first try for a single marker and you can have idea.