Created
June 28, 2017 13:36
-
-
Save JayWIlsonJr/84b9fb67640248b8bf1b883a0719f531 to your computer and use it in GitHub Desktop.
Shows where to call for a map refresh
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
| <div id="map"> | |
| <!-- Make sure the slide element is a child of the #map element, not a sibling --> | |
| <div id="infoSlidePane" class="slide-up-pane"></div> | |
| </div> |
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
| map.one(GoogleMapsEvent.MAP_READY).then( | |
| () => { | |
| // Now you can add elements to the map like the marker | |
| map.addMarker(markerOptions) | |
| .then((marker: Marker) => { | |
| marker.showInfoWindow(); | |
| }); | |
| map.addMarker(steeplechaseMarkerOptions) | |
| .then((steeplechaseMarker: Marker) => { | |
| let slider = document.getElementById('infoSlidePane'); | |
| steeplechaseMarker.on('click').subscribe(data => { | |
| slider.classList.add('slide-up'); // Slider element is positioned in the view | |
| setTimeout(function () { | |
| map.refreshLayout(); // When this method is called the Map's touchable regions within the view are recalculated. | |
| }, 500); | |
| //debugger; | |
| }); | |
| }); | |
| } | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment