Trouble with putting google maps in a collapsible set in jquery mobile.
Hello
I'm trying to put a google map in a collapsible set in a jquery mobile site I'm working on. The map skips when moved in the div but outside the div it behaves normally. Does anyone have a solution for this problem?
The code looks like this and it's inside a collapsible-set:
- <div data-role="collapsible" data-collapsed="true">
- <h3>
- Navigation</h3>
- <div data-role="content" id="map_canvas" >
- <script type="text/javascript">
- function initializeMap() {
- var latlng = new google.maps.LatLng(64.135338, -21.89521);
- var options = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.SATELLITE
- };
- var map = new google.maps.Map(document.getElementById("map_canvas"), options);
- google.maps.event.trigger(map, 'resize');
- var marker = new google.maps.Marker({
- position: latlng,
- map: map,
- title: "Hello World!"
- });
- google.maps.event.trigger(map, 'resize');
- };
- $(function () {
- initializeMap();
- });
-
- </script>
- </div>
- </div>