forked from WorldWindLabs/Quake-Hunter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTectonicPlateLayer.js
48 lines (41 loc) · 1.75 KB
/
TectonicPlateLayer.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
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* Created by gagaus on 8/3/16.
*/
define(['./worldwind.min'],
function (WorldWind) {
"use strict";
function shapeConfigurationCallback(geometry, properties) {
var configuration = {};
configuration.attributes = new WorldWind.ShapeAttributes(null);
configuration.attributes.drawOutline = true;
configuration.attributes.outlineColor = new WorldWind.Color(
0.6 * configuration.attributes.interiorColor.red,
0.3 * configuration.attributes.interiorColor.green,
0.3 * configuration.attributes.interiorColor.blue,
1.0);
configuration.attributes.outlineWidth = 1.0;
return configuration;
};
function TectonicPlateLayer() {
var plateBoundariesLayer = new WorldWind.RenderableLayer("Tectonic Plates");
var plateBoundariesJSON = new WorldWind.GeoJSONParser("./new_eq_app_files/plate_boundaries.json");
plateBoundariesJSON.load(null, shapeConfigurationCallback, plateBoundariesLayer);
return plateBoundariesLayer;
}
return TectonicPlateLayer;
// var TectonicPlateLayer = function () {
// WorldWind.RenderableLayer.call(this, "Blue Marble Image");
//
// var surfaceImage = new WorldWind.SurfaceImage(WorldWind.Sector.FULL_SPHERE,
// './images/wms_plate_boundaries.png');
//
// this.addRenderable(surfaceImage);
//
// this.pickEnabled = false;
// this.minActiveAltitude = 3e6;
// };
//
// TectonicPlateLayer.prototype = Object.create(WorldWind.RenderableLayer.prototype);
//
// return TectonicPlateLayer;
});