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

3 comments:

  1. My primary task was to make an option on the site so that users could create a route to the client, for example, to arrive by car or by the else transport and indicate how much time it would take. Google Maps for
    Joomla https://elfsight.com/google-maps-widget/ I downloaded really quickly and having configured them I realized that everything is working correctly. In general, I can hardly remember what it was before the creation of Google, logistics, transportation. How did this world exist at all?

    ReplyDelete
  2. I know this is one of the most meaningful information for me. And I'm animated reading your article. But should remark on some general things, the website style is perfect; the articles are great. Thanks for the ton of tangible and attainable help. 구글 기프트 카드 판매

    ReplyDelete