Skip to content

Instantly share code, notes, and snippets.

// See https://developers.google.com/maps/documentation/javascript/reference#MapOptions
var MapOptions = {
center : new google.maps.LatLng(41.85,-87.675), // Center of the map, in decimal degrees.
draggable : true, // Can the user drag the map?
mapTypeControl : false, // Can the user change the map from road map to satellite imagery, etc?
mapTypeId : google.maps.MapTypeId.ROADMAP, // Default map type
panControl : false, // Will there be a pan controller on the map?
streetViewControl : false, // Street view controller on the map?
styles : [], // Any special styles?
zoom: 16, // Set the zoom level [0-20]. 20 being zoomed in tight.
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1 minimum-scale=1">
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1" />
<style>
#map img{max-width:none}
</style>
</head>
<style>
#map img{max-width:none}
</style>
@tkompare
tkompare / googlemapsapihowto-lesson1.html
Last active December 18, 2015 01:49
Google Maps API How-to - Lesson 1
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1 minimum-scale=1">
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1" />
</head>
<body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
@tkompare
tkompare / responsiveGoogleMapAPI.html
Created October 19, 2012 02:40
A div for google.maps.Map() in a responsive design. Be sure to transfer the styles to your stylesheet.
<div style="display:inline-block; position:relative; width:100%;">
<div style="margin-top:100%;">
<div id="map" style="position:absolute; top:0; bottom:0; left:0; right:0;">
</div>
</div>
</div>