Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.