Subversion Repositories SmartDukaan

Rev

Rev 36717 | Rev 36730 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36717 Rev 36729
Line 202... Line 202...
202
<div class="modal fade" id="liveTrackingModal" tabindex="-1" role="dialog">
202
<div class="modal fade" id="liveTrackingModal" tabindex="-1" role="dialog">
203
    <div class="modal-dialog modal-lg" role="document" style="width:90%;">
203
    <div class="modal-dialog modal-lg" role="document" style="width:90%;">
204
        <div class="modal-content">
204
        <div class="modal-content">
205
            <div class="modal-header" style="background:#27ae60; color:white;">
205
            <div class="modal-header" style="background:#27ae60; color:white;">
206
                <button type="button" class="close" data-dismiss="modal" style="color:white;">&times;</button>
206
                <button type="button" class="close" data-dismiss="modal" style="color:white;">&times;</button>
207
                <h4 class="modal-title" id="liveTrackingModalTitle"><img src="${rc.contextPath}/resources/images/Bike-Icon-SD.png" style="height:24px; vertical-align:middle; margin-right:6px;"> Live Tracking</h4>
207
                <h4 class="modal-title" id="liveTrackingModalTitle"><img src="${rc.contextPath}/resources/images/salesman.png" style="height:24px; vertical-align:middle; margin-right:6px;"> Live Tracking</h4>
208
            </div>
208
            </div>
209
            <div class="modal-body" style="padding:0;">
209
            <div class="modal-body" style="padding:0;">
210
                <div id="liveTrackingInfo" style="padding:8px 15px; background:#f8f9fa; border-bottom:1px solid #ddd; font-size:13px;"></div>
210
                <div id="liveTrackingInfo" style="padding:8px 15px; background:#f8f9fa; border-bottom:1px solid #ddd; font-size:13px;"></div>
211
                <div id="liveTrackingMap" style="height:500px; width:100%;"></div>
211
                <div id="liveTrackingMap" style="height:500px; width:100%;"></div>
212
            </div>
212
            </div>
Line 669... Line 669...
669
                var lastPoint = pathCoords[pathCoords.length - 1];
669
                var lastPoint = pathCoords[pathCoords.length - 1];
670
                liveTrackingMap._currentMarker = new google.maps.Marker({
670
                liveTrackingMap._currentMarker = new google.maps.Marker({
671
                    position: lastPoint,
671
                    position: lastPoint,
672
                    map: liveTrackingMap,
672
                    map: liveTrackingMap,
673
                    icon: {
673
                    icon: {
674
                        url: '${rc.contextPath}/resources/images/Bike-Icon-SD.png',
674
                        url: '${rc.contextPath}/resources/images/salesman.png',
675
                        scaledSize: new google.maps.Size(56, 56),
675
                        scaledSize: new google.maps.Size(56, 56),
676
                        anchor: new google.maps.Point(28, 28)
676
                        anchor: new google.maps.Point(28, 28)
677
                    },
677
                    },
678
                    title: 'Last Known Location',
678
                    title: 'Last Known Location',
679
                    zIndex: 999
679
                    zIndex: 999
Line 723... Line 723...
723
                infoHtml += ' | Accuracy: <span class="label" style="' + accuracyBadge + ' color:white; padding:2px 8px; border-radius:3px; font-size:11px;">' + accuracyLabel + '</span> (' + avgAccuracy + 'm)';
723
                infoHtml += ' | Accuracy: <span class="label" style="' + accuracyBadge + ' color:white; padding:2px 8px; border-radius:3px; font-size:11px;">' + accuracyLabel + '</span> (' + avgAccuracy + 'm)';
724
            }
724
            }
725
            if (stopsDetected.length > 0) {
725
            if (stopsDetected.length > 0) {
726
                infoHtml += ' | <span style="color:#f39c12;"><i class="fa fa-pause-circle"></i></span> Stops: <strong>' + stopsDetected.length + '</strong>';
726
                infoHtml += ' | <span style="color:#f39c12;"><i class="fa fa-pause-circle"></i></span> Stops: <strong>' + stopsDetected.length + '</strong>';
727
            }
727
            }
728
            infoHtml += ' | <img src="${rc.contextPath}/resources/images/Bike-Icon-SD.png" style="height:16px; vertical-align:middle;"> Last Known';
728
            infoHtml += ' | <img src="${rc.contextPath}/resources/images/salesman.png" style="height:16px; vertical-align:middle;"> Last Known';
729
        } else {
729
        } else {
730
            infoHtml += ' | <span style="color:#999;"><i class="fa fa-exclamation-triangle"></i> No GPS data yet</span>';
730
            infoHtml += ' | <span style="color:#999;"><i class="fa fa-exclamation-triangle"></i> No GPS data yet</span>';
731
        }
731
        }
732
 
732
 
733
        infoHtml += ' | <span style="color:#e74c3c;"><i class="fa fa-arrow-right" style="font-size:10px;"></i></span> GPS Trail';
733
        infoHtml += ' | <span style="color:#e74c3c;"><i class="fa fa-arrow-right" style="font-size:10px;"></i></span> GPS Trail';
Line 784... Line 784...
784
    }*/
784
    }*/
785
 
785
 
786
    $(document).on('click.livetrack', '.live-tracking-btn', function () {
786
    $(document).on('click.livetrack', '.live-tracking-btn', function () {
787
        liveTrackingUserId = $(this).data('userid');
787
        liveTrackingUserId = $(this).data('userid');
788
        liveTrackingUsername = $(this).data('username');
788
        liveTrackingUsername = $(this).data('username');
789
        $('#liveTrackingModalTitle').html('<img src="${rc.contextPath}/resources/images/Bike-Icon-SD.png" style="height:24px; vertical-align:middle; margin-right:6px;"> Live Tracking - ' + liveTrackingUsername);
789
        $('#liveTrackingModalTitle').html('<img src="${rc.contextPath}/resources/images/salesman.png" style="height:24px; vertical-align:middle; margin-right:6px;"> Live Tracking - ' + liveTrackingUsername);
790
        $('#liveTrackingInfo').html('<div class="text-center"><i class="fa fa-spinner fa-spin"></i> Loading...</div>');
790
        $('#liveTrackingInfo').html('<div class="text-center"><i class="fa fa-spinner fa-spin"></i> Loading...</div>');
791
        $('#liveTrackingModal').modal('show');
791
        $('#liveTrackingModal').modal('show');
792
 
792
 
793
        setTimeout(function () {
793
        setTimeout(function () {
794
            liveTrackingMap = null;
794
            liveTrackingMap = null;