Hi guys!
I have a problem. I create ionic application and include google maps to it. It works fine but it is one problem. When I set to marker draggable
property to true
marker doesn’t drag. When I do the same work on blank html page only with google maps and without anything frameworks it works fine. What can be wrong?
It’s my html:
<ion-view view-title="Maps">
<ion-content>
<div id="map" data-tap-disabled="false"></div>
</ion-content>
</ion-view>
sass:
.scroll
height: 100%
#map
width: 100%
height: 100%
My controller:
angular.module ('myApp.controllers')
.controller ('MapsCtrl', function ($scope) {
var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
var mapOptions = {
zoom: 4,
center: myLatlng
};
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
draggable:true,
title:"Drag me!"
});
$scope.map = map;
});