Generation

generate functionMon, 19 Dec 2022

Make users be able to add 2 markers on a map.

function addMarker(map) { var marker = new google.maps.Marker({ position: map.getCenter(), map: map, title: 'Click to zoom' }); google.maps.event.addListener(marker, 'click', function() { map.setZoom(8); map.setCenter(marker.getPosition()); }); }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant