Skip to content

Instantly share code, notes, and snippets.

@Steeru
Created May 9, 2018 11:39
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 Steeru/b9f30562bea696f12bdbeb05a81bf432 to your computer and use it in GitHub Desktop.
Save Steeru/b9f30562bea696f12bdbeb05a81bf432 to your computer and use it in GitHub Desktop.
jQuery(document).ready(function($) {
if ('' !== wp_travel.lat && '' !== wp_travel.lng) {
// Create map.
var map = new GMaps({
div: '#wp-travel-map',
lat: wp_travel.lat,
lng: wp_travel.lng,
scrollwheel: false,
navigationControl: false,
mapTypeControl: false,
scaleControl: false,
// draggable: false,
});
map.setCenter(wp_travel.lat, wp_travel.lng);
map.setZoom(20);
map.addMarker({
lat: wp_travel.lat,
lng: wp_travel.lng,
title: wp_travel.loc,
draggable: false
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment