Advertisement
renanxusa

Untitled

Dec 3rd, 2016
489
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. /*
  2. * Google maps setting and customization
  3. */
  4.  
  5. /*
  6. * Just set the latitude and the longitude you prefer
  7. */
  8. var lat = -22.911307;
  9. var lng = -43.236178;
  10.  
  11.  
  12. var map;
  13. // setting position
  14. var centerMap = new google.maps.LatLng(lat,lng);
  15.  
  16. var MY_MAPTYPE_ID = 'MAP';
  17.  
  18. function initialize() {
  19.  
  20.  
  21. // Map Style
  22. var stylez = [
  23. {
  24. featureType: "all",
  25. stylers: [
  26. { saturation: -80 },
  27. { hue: "#3F5765"}
  28. ]
  29. },{
  30. featureType: "road.arterial",
  31. elementType: "geometry",
  32. stylers: [
  33. { hue: "#00ffee" },
  34. { saturation: 50 }
  35. ]
  36. },{
  37. featureType: "water",
  38. elementType: "geometry",
  39. stylers: [
  40. { saturation: 20}
  41. ]
  42. }
  43. ];
  44. // other option
  45. var mapOptions = {
  46. zoom: 14,
  47. center: centerMap,
  48. navigationControl: true,
  49. scaleControl: false,
  50. scrollwheel:false,
  51. mapTypeControl: false,
  52. mapTypeControlOptions: {
  53. mapTypeIds: [google.maps.MapTypeId.ROADMAP, MY_MAPTYPE_ID]
  54. },
  55. mapTypeId: MY_MAPTYPE_ID
  56. };
  57. map = new google.maps.Map(document.getElementById("map_canvas"),
  58. mapOptions);
  59.  
  60. var styledMapOptions = {
  61. name: "MAP"
  62. };
  63.  
  64. var jayzMapType = new google.maps.StyledMapType(stylez, styledMapOptions);
  65.  
  66. map.mapTypes.set(MY_MAPTYPE_ID, jayzMapType);
  67.  
  68. // PLACEHOLDER / insert your own payoff Placeholder
  69. var image = 'images/segna.png';
  70. var myLatLng = new google.maps.LatLng(lat,lng);
  71. var beachMarker = new google.maps.Marker({
  72. position: myLatLng,
  73. map: map,
  74. icon: image
  75. });
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement