Layers

There are many different kinds of layers available in GeoBlazor. Layers can be stacked on top of each other for combining and comparing data sources and visuals.

Order of Layers

Layers will be added to the map based on the order that they are declared. This becomes important especially for overlapping features, when you want one feature to stand out on top of another. When using Razor markup to add layers, the order of layers will be stacked just as declared, i.e., the first layer is on top, with each subsequent layer being added below the previous layer. Basemap layers are an exception (see below).

<MapView>
    <Map>
        <FeatureLayer Title="Top Layer" />
        <FeatureLayer Title="Middle Layer" />
        <FeatureLayer Title="Bottom Layer" />
    </Map>
</MapView>

Adding layers in code, however, follows the ArcGIS JavaScript SDK pattern, where each new layer is added on top of the existing layers.

private async Task OnViewRendered()
{
    await _mapView.AddLayer(bottomLayer);
    await _mapView.AddLayer(middleLayer);
    await _mapView.AddLayer(topLayer);
}