Skip to content

Instantly share code, notes, and snippets.

@liviucerchez
Created March 8, 2014 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liviucerchez/ec5992e0e0463a74becc to your computer and use it in GitHub Desktop.
Save liviucerchez/ec5992e0e0463a74becc to your computer and use it in GitHub Desktop.
Contact Page - Heading Section
<div class="responsive-container"><div class="responsive-wrapper">
<div id="gmap" class="map"></div>
</div></div>
[raw]<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false"></script><script type="text/javascript">
jQuery(function(){
// initialize custom gmap
var map_name = 'custom_gmap',
loc = new google.maps.LatLng(40.795326, -73.960197), // set location
marker_pos = new google.maps.LatLng(40.795326, -73.960197), // set marker position
stylers = [{
"featureType": "all",
"elementType": "all",
"stylers": [
{ "saturation": "-50" },
{ lightness: 10 }
]
}],
mapOptions = {
zoom: 14,
center: loc,
mapTypeId: map_name,
disableDefaultUI: true,
scrollwheel: false
},
map = new google.maps.Map(document.getElementById("gmap"), mapOptions),
styledMapOptions = {
map: map,
name: map_name + "_map"
},
marker = new google.maps.Marker({
position: marker_pos,
map: map,
icon: 'use your own image marker or remove this param'
}),
custommap = new google.maps.StyledMapType(stylers,styledMapOptions);
map.mapTypes.set(map_name, custommap);
map.setMapTypeId(map_name);
});
</script>[raw]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment