Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function initMap() {
- map = new google.maps.Map(document.getElementById("map"), {
- center: { lat: 51.109990, lng: 17.053},
- zoom: 13
- });
- for (let i = 0; i < data.places.length; i++) {
- let position = data.places[i].location;
- let name = data.places[i].name;
- marker = new google.maps.Marker({
- map: map,
- position: position,
- title: name,
- animation: google.maps.Animation.DROP,
- id: i
- });
- markers.push(marker);
- }
- marker.click(function() {
- const menu =$("#menu");
- infoContent.appendTo(menu);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement