Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. function initMap() {
  2. map = new google.maps.Map(document.getElementById("map"), {
  3. center: { lat: 51.109990, lng: 17.053},
  4. zoom: 13
  5. });
  6.  
  7. for (let i = 0; i < data.places.length; i++) {
  8. let position = data.places[i].location;
  9. let name = data.places[i].name;
  10. marker = new google.maps.Marker({
  11. map: map,
  12. position: position,
  13. title: name,
  14. animation: google.maps.Animation.DROP,
  15. id: i
  16. });
  17. markers.push(marker);
  18. }
  19.  
  20. marker.click(function() {
  21. const menu =$("#menu");
  22. infoContent.appendTo(menu);
  23. });
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement