Last active
February 25, 2017 20:44
-
-
Save fchristant/03c3ec11d06efeb2927cdb69cf88822d to your computer and use it in GitHub Desktop.
Silva.JS GoogleMap client-side
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
window.addEventListener('app.onReady',function() { | |
app.components.load("GoogleMap").then(function(GoogleMap) { | |
var newComp = document.createElement('div'); | |
newComp.innerHTML = '<div class="c_google-map__map"></div>'; | |
newComp.setAttribute('data-component',''); | |
newComp.setAttribute('data-component-init',''); | |
newComp.setAttribute('data-module','GoogleMap'); | |
newComp.setAttribute('data-zoom','1'); | |
newComp.setAttribute('id','map2'); | |
newComp.classList += 'c_google-map'; | |
document.querySelector('.clientDiv').appendChild(newComp); | |
var com2 = new GoogleMap("#map2"); | |
com2.zoom = 2; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment