Last active
March 3, 2017 10:24
-
-
Save m-engel/ebfeb3956c3160df608182c3eb194d2e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
// just for specific template | |
if($resource->get('template') != '3') return true; | |
$modx->regClientStartupScript('http://maps.googleapis.com/maps/api/js?libraries=places&sensor=true'); | |
$modx->regClientStartupScript('<script type="text/javascript"> | |
Ext.onReady(function() { | |
var input = document.getElementById("tv10"); | |
var options = { | |
types: ["(cities)"], | |
componentRestrictions: {country: "de"} | |
}; | |
autocomplete = new google.maps.places.Autocomplete(input, options); | |
}); | |
</script>'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment