-
Notifications
You must be signed in to change notification settings - Fork 9
/
measure.js
35 lines (32 loc) · 929 Bytes
/
measure.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require('angular');
import View from 'ol/View';
import Style from 'ol/style/Style';
import Stroke from 'ol/style/Stroke';
angular.module('example', ['anol', 'anol.map', 'anol.featurepopup', 'anol.zoom', 'anol.measure'])
.config(['MapServiceProvider', 'LayersServiceProvider',
function(MapServiceProvider, LayersServiceProvider) {
MapServiceProvider.addView(new View({
center: [914764, 7011016],
zoom: 18
}));
var wms = new anol.layer.SingleTileWMS({
olLayer: {
source: {
url: 'http://maps.omniscale.net/wms/demo/default/service?',
params: {
'LAYERS': 'osm',
'SRS': 'EPSG:3857'
}
}
}
});
LayersServiceProvider.setLayers([wms]);
}])
.controller('exampleController', ['$scope', function($scope) {
$scope.lineStyle = new Style({
stroke: new Stroke({
color: '#ffccdd',
width: 4
})
});
}]);