Guest User

Untitled

a guest
Nov 19th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. <div class="container-fluid">
  2. <div class="row" style="margin-top: 10px">
  3. <div class="col-md-6 col-xs-6">
  4. <div class="well">
  5. <h4>Settings</h4>
  6. <div id="panomap"></div>
  7. <h5 class="text-center">Click on the map or type in the co-ordinates.</h5>
  8. <div class="row">
  9. <div class="col-md-12 col-xs-12">
  10.  
  11. <div id="map">
  12. </div>
  13. //... others items...
  14. //--JavaScript part
  15. var position = {lat: 40.72815832561118, lng: -73.99564975565187};
  16. sv = new google.maps.StreetViewService();
  17.  
  18. var polylineOptionsActual = new google.maps.Polyline({
  19. strokeColor: '#FF0000',
  20. strokeOpacity: 1.0,
  21. strokeWeight: 10
  22. });
  23.  
  24. directionsService = new google.maps.DirectionsService();
  25. directionsDisplay = new google.maps.DirectionsRenderer({polylineOptions: polylineOptionsActual});
  26.  
  27.  
  28.  
  29. // Setup up the map
  30. map = new google.maps.Map(document.getElementById('map'), {
  31. center: position,
  32. zoom: 17,
  33. mapTypeControl: false,
  34. mapTypeId: google.maps.MapTypeId.ROADMAP,
  35. streetViewControl: false,
  36. mapTypeControlOptions: {
  37. style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR},
  38. navigationControl: true,
  39. navigationControlOptions: {
  40. style: google.maps.NavigationControlStyle.SMALL
  41. }
  42.  
  43. });
  44. map.setOptions({styles: MyOwnStyle});
  45. //console.info('pre GDireccion....');
  46.  
  47.  
  48. //console.info(directionsService);
  49. // Create a marker on click, if the position has Street View data.
  50. map.addListener('click', function(event) {
  51. sv.getPanorama({location: event.latLng, radius: 50},
  52. updateLocationByClick);
  53. });
  54.  
  55.  
  56. panorama = new google.maps.StreetViewPanorama(
  57. document.getElementById('panomap'), {
  58. position: {lat: 40.72815, lng: -73.99564},
  59. pov: { heading: 270, pitch: 0 },
  60. visible: true,
  61. linksControl: true
  62. });
  63.  
  64. //...
Add Comment
Please, Sign In to add comment