I'm using FeatureLayer to render graphics but the icons appear under the street names
I tried to sort the layers, but the reorder function doesn't work for me
layers.reorder(eventLayer, 1)
This is how I create graphics
export const createGraphic = ({
mapViewporItem,
objectId,
selectedEventId,
selectedMapLedgerEntityType,
}: CreateGraphicParams): Graphic | undefined => {
const itemLocation = getEventLocation(mapViewporItem);
const uiState = getUiState({
...
});
const iconType = getEventIconType(mapViewporItem);
const itemGraphicAttributes: MapViewportItemGraphicAttributes = {
objectId,
entityId: mapViewporItem.entityId,
iconName: `${iconType}, ${uiState}`,
uiState,
priority: mapViewporItem.priority,
agencyTypeGlobalAttrId: mapViewporItem.agencyTypeGlobalAttrId,
};
const graphicProperties = {
attributes: itemGraphicAttributes,
geometry: {
type: 'point',
y: itemLocation.latitude,
x: itemLocation.longitude,
spatialReference: ESRI_SPATIAL_REFERENCE,
},
};
return new Graphic(graphicProperties);
};
use the example from arcgis
https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=webstylesymbol-2d
basemap: "gray-vector" street names are on top of graphics/icons,
basemap: "topo-vector" icons are on top of street names.
is there way to make icons alway on top, on any basemaps?