def surface_view(get_uuid: Callable, tab: str) -> html.Div:
    return html.Div(
        style={"height": "35vh"},
        children=[
            wcc.Label(
                id={
                    "id": get_uuid("surface-name"),
                    "tab": tab
                },
                children=
                "Select vector, then click on a correlation to visualize surface",
            ),
            wsc.LeafletMap(
                id={
                    "id": get_uuid("surface-view"),
                    "tab": tab
                },
                layers=[],
                unitScale={},
                autoScaleMap=True,
                minZoom=-19,
                updateMode="update",
                mouseCoords={"position": "bottomright"},
                colorBar={"position": "bottomleft"},
            ),
        ],
    )
 def map_view_layout(self) -> html.Div:
     return html.Div(children=[
         wcc.FlexBox(children=[
             html.Div(children=[
                 html.Label(
                     style={
                         "font-weight": "bold",
                         "textAlign": "center",
                     },
                     children="Select surface",
                 ),
                 dcc.Dropdown(
                     id=self.ids("map-dropdown"),
                     options=[{
                         "label": name,
                         "value": name
                     } for name in self.surfacenames],
                     value=self.surfacenames[0],
                     clearable=False,
                     persistence=True,
                     persistence_type="session",
                 ),
             ]),
         ], ),
         html.Div(
             style={
                 "marginTop": "0px",
                 "height": "800px",
                 "zIndex": -9999,
             },
             children=[
                 # pylint: disable=no-member
                 webviz_subsurface_components.LeafletMap(
                     id=self.ids("layered-map"),
                     layers=[],
                     unitScale={},
                     autoScaleMap=True,
                     minZoom=-19,
                     drawTools={
                         "drawMarker": False,
                         "drawPolygon": False,
                         "drawPolyline": True,
                         "position": "topright",
                     },
                     switch={
                         "value": False,
                         "disabled": False,
                         "label": "Hillshading",
                     },
                     mouseCoords={"position": "bottomright"},
                     colorBar={"position": "bottomright"},
                 ),
             ],
         ),
     ])
Example #3
0
def surface_view(parent: "PropertyStatistics", tab: str) -> html.Div:
    return html.Div(
        style={"height": "35vh"},
        children=[
            html.H5(
                id={"id": parent.uuid("surface-name"), "tab": tab},
                children="Select vector, then click on a correlation to visualize surface",
            ),
            wsc.LeafletMap(
                id={"id": parent.uuid("surface-view"), "tab": tab},
                layers=[],
                unitScale={},
                autoScaleMap=True,
                minZoom=-5,
                updateMode="update",
                mouseCoords={"position": "bottomright"},
                colorBar={"position": "bottomleft"},
            ),
        ],
    )
Example #4
0
def surface_view(parent: "PropertyStatistics",
                 ensemble: str,
                 layers: list,
                 synced_ids: list = None) -> wsc.LeafletMap:
    return html.Div(
        style={"height": "22vh"},
        children=wsc.LeafletMap(
            id=f"{parent.uuid('surface-view-delta')}{ensemble}",
            layers=layers,
            syncedMaps=[
                f"{parent.uuid('surface-view-delta')}{s_id}"
                for s_id in synced_ids
            ] if synced_ids is not None else [],
            unitScale={},
            autoScaleMap=True,
            minZoom=-5,
            updateMode="replace",
            mouseCoords={"position": "bottomright"},
            colorBar={"position": "bottomleft"},
        ),
    )
Example #5
0
                    "maxvalue": max_value,
                    "bounds": [[0, 0], [30, 30]],
                    "shader": {"setBlackToAlpha": True},
                },
            ],
        }
    ]

    leaflet_map_1 = webviz_subsurface_components.LeafletMap(
        id="example-map",
        syncedMaps=["example-map-2", "example-map"],
        syncDrawings=True,
        layers=layers,
        colorBar={"position": "bottomleft"},
        mouseCoords={"coordinatePosition": "bottomright",},
        drawTools={
            "drawMarker": True,
            "drawPolygon": True,
            "drawPolyline": True,
            "position": "topright",
        },
        updateMode="",
    )

    leaflet_map_2 = webviz_subsurface_components.LeafletMap(
        id="example-map-2",
        syncedMaps=["example-map-2", "example-map"],
        syncDrawings=True,
        layers=layers,
        colorBar={"position": "bottomleft"},
        mouseCoords={"coordinatePosition": "bottomright",},
                "url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
                "colormap":
                "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAABCAYAAAAxWXB3AAAAuElEQVR4nI2NyxUDIQwDR6K0lJD+W1nnABgvIZ8DT7JGNnroieRAQjJYMFQ2SDBUk0mrl16odGce05de9Z2zzStLLhEuvurIZzeZOedizd7mT70f7JOe7v7XA/jBBaH4ztn3462z37l1c7/ys1f6QFNZuUZ+1+JZ3oVN79FxctLvLB/XIQuslbe3+eSv7LVyd/KmC9O13Vjf63zt7r3kW7dR/iVuvv/H8NBE1/SiIayhiCZjhDFN5gX8UYgJzVykqAAAAABJRU5ErkJggg==",
                "shader": {
                    "type": "none",
                    "elevationScale": 0.01,
                },
            }],
        },
    ]

    leaflet_map_1 = webviz_subsurface_components.LeafletMap(
        id="example-map",
        layers=layers,
        colorBar={"position": "bottomleft"},
        mouseCoords={
            "coordinatePosition": "bottomright",
        },
        updateMode="",
    )

    app = dash.Dash(__name__)

    # Dash extension used to call multiple callbacks on the same output
    cg = CallbackGrouper()

    app.layout = html.Div(children=[
        html.Div([
            "Layer to edit:",
            dcc.Dropdown(
                id="selected-layer",
Example #7
0
                    "minvalue": min_value,
                    "maxvalue": max_value,
                    "type": "tile",
                    "url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
                    "colormap": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAABCAYAAAAxWXB3AAAAuElEQVR4nI2NyxUDIQwDR6K0lJD+W1nnABgvIZ8DT7JGNnroieRAQjJYMFQ2SDBUk0mrl16odGce05de9Z2zzStLLhEuvurIZzeZOedizd7mT70f7JOe7v7XA/jBBaH4ztn3462z37l1c7/ys1f6QFNZuUZ+1+JZ3oVN79FxctLvLB/XIQuslbe3+eSv7LVyd/KmC9O13Vjf63zt7r3kW7dR/iVuvv/H8NBE1/SiIayhiCZjhDFN5gX8UYgJzVykqAAAAABJRU5ErkJggg==",
                    "shader": {"type": "none", "elevationScale": 0.01,},
                }
            ],
        },
    ]

    leaflet_map_1 = webviz_subsurface_components.LeafletMap(
        id="example-map",
        syncedMaps=["example-map-2", "example-map"],
        syncDrawings=True,
        layers=layers,
        colorBar={"position": "bottomleft"},
        mouseCoords={"coordinatePosition": "bottomright",},
        scaleY={"scaleY": 1, "minScaleY": 1, "maxScaleY": 10, "position": "topleft",},
        updateMode="",
    )

    app = dash.Dash(__name__)

    # Dash extension used to call multiple callbacks on the same output
    cg = CallbackGrouper()

    app.layout = html.Div(
        children=[
            html.Div(
                [
                    html.Button("Add layer", id="layer-add-btn"),
 leaflet_map_1 = webviz_subsurface_components.LeafletMap(
     id="example-map",
     layers=[
         {
             "name":
             "A seismic horizon with colormap",
             "id":
             1,
             "baseLayer":
             True,
             "checked":
             True,
             "action":
             None,
             "data": [
                 {
                     "type": "image",
                     "url": map_data,
                     "colorScale": {
                         "colors": DEFAULT_COLORSCALE_COLORS,
                         "prefixz_arrayeroAlpha": False,
                         "scaleType": "linear",
                         "cutPointMin": 0,
                         "cutPointMax": 1,
                         "remapPointMin": 0,
                         "remapPointMax": 1,
                     },
                     "minvalue": min_value,
                     "maxvalue": max_value,
                     "bounds": [[432205, 6475078], [437720, 6481113]],
                     "shader": {
                         "type": "terrainRGB",
                         "applyColorScale": True,
                         "applyHillshading": True,
                         "ambientLightIntensity": 0.5,
                         "diffuseLightIntensity": 0.5,
                     },
                 },
             ],
         },
     ],
     colorBar={"position": "bottomleft"},
     defaultBounds=[[0, 0], [30, 30]],
     mouseCoords={
         "coordinatePosition": "bottomright",
     },
     updateMode="",
     minz_arrayoom=-5,
 )
Example #9
0
                    "url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
                    "colormap": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAABCAYAAAAxWXB3AAAAuElEQVR4nI2NyxUDIQwDR6K0lJD+W1nnABgvIZ8DT7JGNnroieRAQjJYMFQ2SDBUk0mrl16odGce05de9Z2zzStLLhEuvurIZzeZOedizd7mT70f7JOe7v7XA/jBBaH4ztn3462z37l1c7/ys1f6QFNZuUZ+1+JZ3oVN79FxctLvLB/XIQuslbe3+eSv7LVyd/KmC9O13Vjf63zt7r3kW7dR/iVuvv/H8NBE1/SiIayhiCZjhDFN5gX8UYgJzVykqAAAAABJRU5ErkJggg==",
                    "shader": {"type": "none", "elevationScale": 0.01,},
                }
            ],
        },
    ]

    leaflet_map_1 = webviz_subsurface_components.LeafletMap(
        id="example-map",
        syncDrawings=True,
        layers=layers,
        colorBar={"position": "bottomleft"},
        mouseCoords={"coordinatePosition": "bottomright",},
        switch={"value": False, "label": "Hillshading",},
        drawTools={
            "drawMarker": True,
            "drawPolygon": True,
            "drawPolyline": True,
            "position": "topright",
        },
        scaleY={"scaleY": 1, "minScaleY": 1, "maxScaleY": 10, "position": "topleft",},
        updateMode="",
    )

    app = dash.Dash(__name__)

    # Dash extension used to call multiple callbacks on the same output
    cg = CallbackGrouper()

    app.layout = html.Div(
        children=[