Create a gist now

Instantly share code, notes, and snippets.

Google Maps V3 Drawing
<script type="text/javascript">
window.onload = function() {
var myOptions = {
center: new google.maps.LatLng(50.909528, 34.811726),
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoom: 15,
draggable: true,
mapTypeControl: false,
panControl: false,
streetViewControl: false,
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.SMALL
var map = new google.maps.Map(document.getElementById('map'), myOptions);
var drawingManager = new google.maps.drawing.DrawingManager({
drawingControl: true,
drawingControlOptions: {
position: google.maps.ControlPosition.TOP_RIGHT,
drawingModes: [google.maps.drawing.OverlayType.POLYGON]
polygonOptions: {
editable: true,
clickable: true,
draggable: true,
strokeColor: '#1E90FF',
strokeOpacity: 0.7,
fillColor: '#1E90FF',
fillOpacity: 0.2,
strokeWeight: 2,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment