Created
May 9, 2018 11:39
-
-
Save Steeru/68a53d3f361e76b24e89f9436294fd4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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