Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

Trying to work out why this JSFiddle Works i.e the Marker is displayed as MapIdle() is triggered successfully: http://jsfiddle.net/sjmcpherso/9kF7d/

$scope.onMapIdle = function() {
    if ($scope.myMarkers === undefined){    
        var marker = new google.maps.Marker({
            map: $scope.myMap,
            position: ll
        });
        $scope.myMarkers = [marker, ];
    }
};

but in this Plnkr: http://plnkr.co/edit/wPFtWSpjj0MwxqaQ7bh3?p=preview with the same code the MapIdle() Function is not triggered.

I'm guessing it something to do with the load order of the External scripts setup in JSFiddle.

Can anyone shed some light on this and/or get that Plnkr working

Regards

share|improve this question
up vote 0 down vote accepted

Just needed to add JQUERY to your plunker which was already there in fiddle but not in plunker just add

 <script src="http://code.jquery.com/jquery-1.8.3.js"></script>

to your plunker its works, and also make sure you import jquery first and other JS files later

Here is the WORKING PLUNKER

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.