Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. var locations = [
  2. ['Russ Martin</br>MT,VT, NH, ME (all firms)',46.537711,-111.932769,1],
  3. ['Carey Fischer</br>NY- Upstate ex Rockland County (BD, FP)',40.714353,-74.005973,2],
  4. ['Brandon Born</br>CT, NY - Upstate, MA - ex metro Boston (FI), MA - Central, West (all firms)',41.5178234,-72.757507,3],
  5. ['Joe Tocyloski</br>PA - East, NJ - South (FP)',40.9945928,-77.6046984,4],
  6. ['Phil Hemery</br>NJ (FI), NJ - Bergen County (all firms), NY - NYC (FI,RIA)/Westchester (FI,BD)/Rockland County (all firms)',40.1430241,-74.7311156,5],
  7. ['Bob Mancini</br>MA - East (all firms)',42.0629399,-71.718067,6],
  8. ['Damien Ramondo</br>NJ, PA East',40.1430241,-74.7311156,7],
  9. ['Kevin Gang</br>W VA,PA - West (all firms), OH - Cleveland (BD, FI)',38.0033854,-79.7715309,8],
  10. ['Andrew Fischer</br>MI - (all firms)',44.9700413,-86.4158049,9],
  11. ['David Saslowsky</br>NYC',40.7056308,-73.9780035,10],
  12. ['Robert Brazofsky</br>NYC',40.7056308,-73.9780035,11],
  13. ['Joseph Proscia</br>NJ - North ex Bergen County, NY - NYC (FP)',40.1430241,-74.7311156,12],
  14. ['William Marsalise</br>NY - LI and Outer Boroughs (FI), LI Planners',40.7056308,-73.9780035,13],
  15. ['Dan Stack</br>OH - Columbus and South (all firms), KY - Covington (all firms)',40.7056308,-73.9780035,14],
  16. ['James Broderick</br>OH - North of Columbus ex Cleveland (all firms), Cleveland (FP)',40.1903624,-82.6692524,15]
  17.  
  18. ];
  19.  
  20. var us = new google.maps.LatLng(46.879682,-110.362566);
  21. var map = new google.maps.Map(document.getElementById('map'), {
  22. zoom: 4,
  23. center: us,
  24. mapTypeControl: false,
  25. streetViewControl: false,
  26. panControl: false,
  27. mapTypeId: google.maps.MapTypeId.ROADMAP
  28. });
  29.  
  30. var infowindow = new google.maps.InfoWindow(),marker, i,markers = new Array();
  31.  
  32. for (var i = 0; i < locations.length; i++) {
  33. var lat = locations[i][1], lang = locations[i][2],floating_point = [i][3];
  34. marker = new google.maps.Marker({
  35. /*icon:{
  36. strokeColor:'green',
  37. scale:3
  38. },*/
  39. position: new google.maps.LatLng(lat,lang),
  40. map: map,
  41. animation:google.maps.Animation.DROP,
  42. zIndex:floating_point
  43.  
  44. });
  45.  
  46. markers.push(marker);
  47.  
  48. google.maps.event.addListener(marker, 'mouseover', (function(marker, i) {
  49. return function() {
  50. infowindow.setContent(locations[i][0]);
  51. infowindow.open(map, marker);
  52. }
  53. })(marker, i));
  54.  
  55. }
  56.  
  57. function AutoCenter() {
  58. var bounds = new google.maps.LatLngBounds();
  59. $.each(markers, function (index, marker) {
  60. bounds.extend(marker.position);
  61. });
  62. map.fitBounds(bounds);
  63. }
  64. AutoCenter();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement