Guest User

Untitled

a guest
May 22nd, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script src="https://maps.googleapis.com/maps/api/js"></script>
  2. <script src=" https://googlemaps.github.io/js-marker-clusterer/src/markerclusterer.js"></script>
  3.  
  4. <script>
  5.             $(document).ready(function () {
  6.             var center = new google.maps.LatLng(50.6415574,5.5796662);
  7.             var options = {
  8.               'zoom': 12,
  9.               'center': center,
  10.               'icon' : 'images/p-point.png',
  11.               'mapTypeId': google.maps.MapTypeId.ROADMAP
  12.             };
  13.            
  14.             var map = new google.maps.Map(document.getElementById('map'), options);var list_spot = [['70',50.645153,5.632894 ],['145',50.665409,5.530678 ],['168',50.682877,5.527535 ],['150',50.670654,5.472481 ],['169',50.426090,5.979172 ],['151',50.709488,4.994297 ],['73',50.545174,4.974006 ],['110',50.468719,4.852498 ],['69',50.568207,4.697726 ],['109',50.559429,4.690932 ],['61',50.569511,4.688567 ],['42',50.670383,4.621989 ],['27',50.674637,4.619224 ],['54',50.675697,4.617621 ],['24',50.673859,4.615169 ],['46',50.663143,4.609794 ],['26',50.671288,4.608590 ],['25',50.665424,4.608087 ],['31',50.665890,4.607531 ],['44',50.669609,4.607651 ],['98',50.715538,4.607629 ],['20',50.711205,4.587973 ],['146',50.942688,4.616462 ],['123',50.480316,4.492396 ],['126',50.884884,4.523067 ],['148',50.821972,4.488554 ],['118',50.877171,4.504310 ],['171',50.413700,4.487314 ],['107',50.838505,4.474499 ],['172',50.660450,4.413296 ],['164',50.847492,4.445734 ],['144',50.916248,4.482438 ],['121',50.915352,4.478718 ],['28',50.675655,4.390392 ],['119',50.850292,4.433902 ],['56',50.846367,4.430960 ],['67',50.444775,4.424193 ],['111',50.839832,4.412004 ],['68',50.856045,4.415917 ],['65',50.850941,4.401200 ],['114',50.864120,4.403282 ],['64',50.829754,4.371815 ],['115',50.862705,4.358927 ],['143',50.858902,4.350563 ],['117',50.811127,4.331038 ],['53',50.812290,4.329650 ],['102',50.811508,4.326772 ],['29',50.812943,4.327110 ],['105',50.813435,4.324834 ],['92',50.804707,4.321363 ],['108',50.821609,4.325936 ],['124',50.891254,4.339789 ],['104',50.891445,4.332249 ],['132',50.893970,4.329912 ],['51',50.870667,4.313655 ],['125',50.889408,4.321708 ],['50',50.443527,3.942884 ],['166',50.452057,3.935956 ],['116',51.110249,2.609528 ],['55',45.502506,-73.831635 ]];var markers = [];
  15.         var marker;
  16.         for (var i = 0; i < list_spot.length; i++) {
  17.                     var latLng = new google.maps.LatLng(list_spot[i][1],list_spot[i][2]);
  18.                     var marker = new google.maps.Marker({'position': latLng,
  19.                                                          'map': map,
  20.                                                          'animation' : google.maps.Animation.null,
  21.                                                          'title' : list_spot[i][0],
  22.                                                          'icon' : 'images/p-point.png'});
  23.              
  24.                    
  25.                     google.maps.event.addListener(marker, 'click', (function(marker, i) {
  26.                         return function() {
  27.                             $.fn.bigpop({
  28.                                 parking: list_spot[i][0]
  29.                             });
  30.                            
  31.                         }
  32.                     })(marker, i));
  33.  
  34.                      markers.push(marker);
  35.  
  36.                    
  37.                    
  38.         }
  39.         var markerCluster = new MarkerClusterer(map, markers);});</script>
  40. <div id="map" lol="lol" style="width: 849px; height :  px; " float: none;"></div>
Advertisement
Add Comment
Please, Sign In to add comment