Skip to content

Instantly share code, notes, and snippets.

@ss23
Created March 19, 2013 01:44
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 ss23/5192974 to your computer and use it in GitHub Desktop.
Save ss23/5192974 to your computer and use it in GitHub Desktop.
var map;
jQuery(document).ready(function() {
var mapOptions = {
center: new google.maps.LatLng(-37.522797, 175.567017),
zoom: 6,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map-select"), mapOptions);
/*
jQuery('#map-select').parents('form').submit(function() {
newOptions = {};
newOptions.zoom = map.zoom;
newOptions.center = {};
newOptions.center.lat = map.center.mb;
newOptions.center.lng = map.center.nb;
console.log(newOptions);
//jQuery("[name=MapOptions]").val(JSON.stringify(newOptions));
});
*/
/*
jQuery("#add-marker").click(function() {
console.log('clicked');
marker = new google.maps.Marker({
position: map.center,
map: map,
draggable: true
});
}); */
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment