Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var locations = [
- ['Bondi Beach', -33.890542, 151.274856, 4],
- ['Coogee Beach', -33.923036, 151.259052, 5],
- ['Cronulla Beach', -34.028249, 151.157507, 3],
- ['Manly Beach', -33.80010128657071, 151.28747820854187, 2],
- ['Maroubra Beach', -33.950198, 151.259302, 1]
- ];
- var map = new google.maps.Map(document.getElementById('map'), {
- zoom: 10,
- center: new google.maps.LatLng(-33.92, 151.25),
- mapTypeId: google.maps.MapTypeId.ROADMAP
- });
- var infowindow = new google.maps.InfoWindow();
- var marker, i;
- for (i = 0; i < locations.length; i++) {
- marker = new google.maps.Marker({
- position: new google.maps.LatLng(locations[i][1], locations[i][2]),
- map: map
- });
- google.maps.event.addListener(marker, 'click', (function(marker, i) {
- return function() {
- infowindow.setContent(locations[i][0]);
- infowindow.open(map, marker);
- }
- })(marker, i));
- }
- var locations = [
- ['Bondi Beach', -33.890542, 151.274856, 4, "http://i.imgur.com/GyqbZzs.gif"],
- ['Coogee Beach', -33.923036, 151.259052, 5, "http://i.imgur.com/LTCOHYH.gif"],
- ['Cronulla Beach', -34.028249, 151.157507, 3, "http://i.imgur.com/4CCFNWR.gif"],
- ['Manly Beach', -33.80010128657071, 151.28747820854187, 2, "http://i.imgur.com/dRIZ8LN.gif"],
- ['Maroubra Beach', -33.950198, 151.259302, 1, "http://i.imgur.com/WjZlFve.gif"]
- ];
- marker = new google.maps.Marker({
- position: new google.maps.LatLng(locations[i][1], locations[i][2]),
- map: map,
- icon: locations[i][4]
- });
- var locations = [
- ['Bondi Beach', -33.890542, 151.274856, 4, "http://i.imgur.com/GyqbZzs.gif"],
- ['Coogee Beach', -33.923036, 151.259052, 5, "http://i.imgur.com/LTCOHYH.gif"],
- ['Cronulla Beach', -34.028249, 151.157507, 3, "http://i.imgur.com/4CCFNWR.gif"],
- ['Manly Beach', -33.80010128657071, 151.28747820854187, 2, "http://i.imgur.com/dRIZ8LN.gif"],
- ['Maroubra Beach', -33.950198, 151.259302, 1, "http://i.imgur.com/WjZlFve.gif"]
- ];
- var map = new google.maps.Map(document.getElementById('map'), {
- zoom: 10,
- center: new google.maps.LatLng(-33.92, 151.25),
- mapTypeId: google.maps.MapTypeId.ROADMAP
- });
- var infowindow = new google.maps.InfoWindow();
- var marker, i;
- for (i = 0; i < locations.length; i++) {
- marker = new google.maps.Marker({
- position: new google.maps.LatLng(locations[i][1], locations[i][2]),
- map: map,
- icon: locations[i][4]
- });
- google.maps.event.addListener(marker, 'click', (function(marker, i) {
- return function() {
- infowindow.setContent(locations[i][0]);
- infowindow.open(map, marker);
- }
- })(marker, i));
- }
- var locations = [
- ['Bondi Beach', -33.890542, 151.274856, 4, 'ruta/a/tu/imagen1.png'],
- ['Coogee Beach', -33.923036, 151.259052, 5, 'ruta/a/tu/imagen2.png'],
- ['Cronulla Beach', -34.028249, 151.157507, 3, 'ruta/a/tu/imagen3.png'],
- ['Manly Beach', -33.80010128657071, 151.28747820854187, 2, 'ruta/a/tu/imagen4.png'],
- ['Maroubra Beach', -33.950198, 151.259302, 1, 'ruta/a/tu/imagen5.png']
- ];
- var marker = new google.maps.Marker({
- position: new google.maps.LatLng(locations[i][1], locations[i][2]),
- map: map,
- icon: locations[i][4]
- });
Add Comment
Please, Sign In to add comment