Multiple markers with infowindows in Google map API


  • Add a div tag to your html file and give an id like "GoogleMap" for the div.
  • Crate a Google map variable and assign the google map object to it.
  • For example, We have an array of 5 sample latitude and longitude values with location name.
  • After creating the google map object, then create the marker and infowindow for each latlong.
  • Finally an additional checking for open an infowindow at a time.


Demo

No comments:

Post a Comment