46 lines
1.6 KiB
HTML
Executable File
46 lines
1.6 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.google.com/maps/api/js?sensor=false"></script>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.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/directives/map-data.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 = app || angular.module('myApp', ['ngMap']);
|
|
app.controller('LayerDataQuakesSimpleCtrl', function($scope) {
|
|
$scope.styleFunc = function(feature) {
|
|
var mag = Math.exp(parseFloat(feature.getProperty('mag'))) * 0.1;
|
|
return /** @type {google.maps.Data.StyleOptions} */({
|
|
icon: {
|
|
path: google.maps.SymbolPath.CIRCLE,
|
|
scale: mag,
|
|
fillColor: '#f00',
|
|
fillOpacity: 0.35,
|
|
strokeWeight: 0
|
|
}
|
|
});
|
|
};
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div ng-controller="LayerDataQuakesSimpleCtrl">
|
|
<map zoom="3" center="20, -160">
|
|
<map-data
|
|
set-style="styleFunc"
|
|
load-geo-json="scripts/quakes.geo.json"></map-data>
|
|
</map>
|
|
</div>
|
|
</body>
|
|
</html>
|