54 lines
1.7 KiB
HTML
Executable File
54 lines
1.7 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html ng-app="myApp">
|
|
<head>
|
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
|
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>
|
|
<script src="scripts/app.js"></script>
|
|
<!-- build:js scripts/ng-map.min.js -->
|
|
<script src="../app/scripts/app.js"></script>
|
|
<script src="../app/scripts/directives/map_controller.js"></script>
|
|
<script src="../app/scripts/directives/map.js"></script>
|
|
<script src="../app/scripts/directives/marker.js"></script>
|
|
<script src="../app/scripts/directives/shape.js"></script>
|
|
<script src="../app/scripts/services/geo_coder.js"></script>
|
|
<script src="../app/scripts/services/navigator_geolocation.js"></script>
|
|
<script src="../app/scripts/services/attr2_options.js"></script>
|
|
<!-- endbuild -->
|
|
<script>
|
|
var app = angular.module('myApp', ['ngMap']);
|
|
app.controller('OverlaySymbolAnimateCtrl', function($scope, $interval) {
|
|
$scope.$on('mapInitialized', function(evt, map) {
|
|
var count = 0;
|
|
var line = $scope.map.shapes.foo;
|
|
$interval(function() {
|
|
count = (count + 1) % 200;
|
|
var icons = line.get('icons');
|
|
icons[0].offset = (count / 2) + '%';
|
|
line.set('icons', icons);
|
|
}, 20);
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div ng-controller="OverlaySymbolAnimateCtrl">
|
|
<map zoom="5" center="20.291, 153.027" map-type-id="TERRAIN">
|
|
<shape name="polyline" id="foo"
|
|
icons="[{
|
|
icon: {
|
|
path: 'CIRCLE',
|
|
scale: 8,
|
|
strokeColor: '#393'
|
|
},
|
|
offset: '100%'
|
|
}]"
|
|
path="[[22.291, 153.027], [18.291, 153.027]]">
|
|
</shape>
|
|
</map>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|