Skip to content

Commit

Permalink
NASA-AMMOS#303 Photosphere Targets and Target Pairing (NASA-AMMOS#340)
Browse files Browse the repository at this point in the history
* NASA-AMMOS#303 Pairings attachments, photosphere targets not working yet

* NASA-AMMOS#303 AzEl computed markers in Photosphere, deleted old docs

* Add back in swagger docs

* NASA-AMMOS#303 Use originOFfset

* Refactor with the uuid upgrade, Update docs
  • Loading branch information
tariqksoliman authored Feb 22, 2023
1 parent 9f97fe1 commit 4ce961b
Show file tree
Hide file tree
Showing 52 changed files with 712 additions and 3,003 deletions.
9 changes: 9 additions & 0 deletions config/css/config.css
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,18 @@ textarea {
display: flex;
justify-content: space-between;
}
.modal .layerHelp {
height: 35px;
padding: 0px 6px;
margin-right: 12px;
cursor: pointer;
color: #039be5;
transition: color 0.1s cubic-bezier(0.39, 0.575, 0.565, 1);
}
.modal .clone {
height: 35px;
cursor: pointer;
margin-left: 12px;
color: #777;
transition: color 0.1s cubic-bezier(0.39, 0.575, 0.565, 1);
}
Expand Down
12 changes: 12 additions & 0 deletions config/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,10 @@ function makeLayerBarAndModal(d, level, options) {
"<div class='modal-content' style='padding-bottom: 0; margin-bottom: " + ((d.type === 'header') ? '260px' : '0') + ";'>" +
"<div class='modal-title'>" +
"<h4 id='modal_name'>" + d.name + "</h4>" +
"<div style='display: flex;'>" +
"<div class='layerHelp'><a href='https://nasa-ammos.github.io/MMGIS/configure/layers' target='__blank' rel='noopener'><i class='mdi mdi-help mdi-24px' title='Layer Configuration Docs'></i></a></div>" +
"<div class='clone'><i class='mdi mdi-content-duplicate mdi-24px' title='Clone Layer'></i></div>" +
"</div>" +
"</div>" +
"<p>" +

Expand Down Expand Up @@ -2750,6 +2753,15 @@ function layerPopulateVariable(modalId, layerType) {
theme: "default || solid",
size: "default || large",
},
pairings: {
initialVisibility: false,
layers: ["Array of layer names to pair"],
pairProp:
"path.to.pair.prop.for.this.layer.and.all.paired.layers.to.link.on",
style: {
any_normal_style_field: "to_style_connective_lines",
},
},
};
currentLayerVars.coordinateAttachments =
currentLayerVars.coordinateAttachments || {
Expand Down
20 changes: 20 additions & 0 deletions docs/pages/Configure/Layers/Vector/Vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,20 @@ Example:
"initialVisibility": false,
"theme": "default || solid",
"size": "default || large"
},
"pairings": {
"initialVisibility": false,
"layers": ["Array of layer names to pair"],
"originOffsetOrder": [
"X",
"Y",
"Z"
],
"pairProp":
"path.to.pair.prop.for.this.layer.and.all.paired.layers.to.link.on",
"style": {
"any_normal_style_field": "to_style_connective_lines",
}
}
},
"coordinateAttachments": {
Expand Down Expand Up @@ -254,6 +268,12 @@ Example:
- `initialVisibility`: Whether the label sublayer is initially on. Users can toggle sublayers on and off in the layer settings in the LayersTool.
- `theme`: Label theme. Either `default` or `solid`. Default is white text with a black border. Solid is white text with a dark-grey background box.
- `size`: Label size. Either `default` or `large`. Default is 14px, large is 16px.
- `pairings`: Links cross-layer features together. Features paired to this layer will attempt to compute the azimuth-elevation relationship between the two to draw in the Viewer's PhotoSphere. Additionally, on the Map, a line will be drawn between the two features.
- `initialVisibility`: Whether the pairing line sublayer is initially on. Users can toggle sublayers on and off in the layer settings in the LayersTool.
- `layers`: An array of names of other layers. Note: Do not use css shorthand color names ("blue", "maroon", ...) in the paired layers styles as they won't parse properly when drawing in the PhotoSphere.
- `originOffsetOrder`: In many cases, a marker's center is not the camera's center. Within a feature's `properties.images` objects, `originOffset` can be defined. `originOffsetOrder` describes the XYZ order and signage that `originOffset` should be read in. Possible values are `X, -X, Y, -Y, Z, -Z`.
- `pairProp`: The dot notated path to the feature properties that contains the property to pair on. This layer and all paired layers need this property to properly pair up. A feature in this layer is said to be paired with a feature of one of the other specified layers, if and only if the values of this property in both features matches.
- `style`: A style object to change the style of the connective lines on the Map between features. (Ex. { "color": "#00000", "weight": 5})
- `coordinateAttachments`: Attachment layers for each coordinate of every feature.
- `marker`: Place a marker at every coordinate of every feature.
- `initialVisibility`: Whether the coordinate marker sublayer is initially on. Users can toggle sublayers on and off in the layer settings in the LayersTool.
Expand Down
18 changes: 10 additions & 8 deletions docs/pages/Configure/Tabs/Panels/Panels_Tab.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ The Viewer sits to the left of the main Map. It can be expanded by clicking the
"azmax": 48.5537,
"elmin": -75.0502,
"elmax": 6.95029,
"elzero": 149.584
"elzero": 149.584,
"originOffset": [-0.675,-0.5778,-1.946123]
}
]
}
Expand Down Expand Up @@ -80,13 +81,14 @@ A Deep Zoom Image is a format of tiled imagery used to render massive images. Po

This deprojects a cylindrical mosaic by wrapping it to a 3D sphere (think Google StreetView). To do this, additional parameters are needed.

- rows: Y-axis pixel dimension.
- columns: X-axis pixel dimension.
- azmin: The azimuth in degrees of the left side of the image. Values are between 0 and 360 with 0 being north and 90 being east.
- azmax: The azimuth in degrees of the right side of the image. Values are between 0 and 360 with 0 being north and 90 being east.
- elmin: The elevation in degrees of the bottom of the image. Values are between -90 and 90 with -90 being straight down and 90 being straight up.
- elmax: The elevation in degrees of the top of the image. Values are between -90 and 90 with -90 being straight down and 90 being straight up.
- elzero: The number of pixels from the top of the image where the elevation is zero.
- `rows`: Y-axis pixel dimension.
- `columns`: X-axis pixel dimension.
- `azmin`: The azimuth in degrees of the left side of the image. Values are between 0 and 360 with 0 being north and 90 being east.
- `azmax`: The azimuth in degrees of the right side of the image. Values are between 0 and 360 with 0 being north and 90 being east.
- `elmin`: The elevation in degrees of the bottom of the image. Values are between -90 and 90 with -90 being straight down and 90 being straight up.
- `elmax`: The elevation in degrees of the top of the image. Values are between -90 and 90 with -90 being straight down and 90 being straight up.
- `elzero`: The number of pixels from the top of the image where the elevation is zero.
- `originOffset`: If not centered on the feature, the vector offset in meters from the feature's center. If not in [X, Y, Z] order, the coordinate order of this vector can be redefined in the `layerAttachments.pairings.originOffsetOrder` field in the layer's raw variables.

_Note: Extremely large mosaics may need to be scaled down ahead of time._

Expand Down
51 changes: 4 additions & 47 deletions documentation/docs.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,8 @@
//Form nav
let pages = [
"README",
"JavaScript_API",
"AR_and_VR",
"Deep_Linking",
"Development",
"ENVs",
];
let configure = [
"Configure",
"Overall_Tab",
"Initial_Tab",
"Layers_Tab",
"Tools_Tab",
"Projection_Tab",
"Look_Tab",
"Panels_Tab",
"Time_Tab",
"Kinds",
"Vector_Styling",
"Layer_URLs",
"Keys",
"Manage_Datasets",
"Manage_Geodatasets",
"Remote_Virtual_Layer",
];
let layers = [
"Data",
"Header",
"Model",
"Query",
"Tile",
"Vector_Tile",
"Vector",
];
let tools = [
"Chemistry",
"Draw",
"Identifier",
"Info",
"Isochrone",
"Layers",
"Legend",
"Measure",
"Sites",
"Viewshed",
];
let pages = ["README"];
let configure = [];
let layers = [];
let tools = [];
let apis = [
{ name: "Main", path: "../api/docs/main" },
{ name: "Spatial", path: "../api/docs/spatial/" },
Expand Down
120 changes: 0 additions & 120 deletions documentation/pages/markdowns/AR_and_VR.md

This file was deleted.

36 changes: 0 additions & 36 deletions documentation/pages/markdowns/Chemistry.md

This file was deleted.

44 changes: 0 additions & 44 deletions documentation/pages/markdowns/Configure.md

This file was deleted.

Loading

0 comments on commit 4ce961b

Please sign in to comment.