Class BundleMapLayerManager
java.lang.Object
overit.geocallapp.wfm.core.ux.bundler.search.detail.BundleMapLayerManager
Layer manager class for BundleMapContainer following the MVC pattern.
This class handles all the business logic for extracting and processing
bundle-related geographic data from multiple BundleEntitiesAggregate models.
For each BundleEntitiesAggregate, it manages a triad of layers: bundle operations,
bundle header, and bundle starting position.
- Since:
- 20.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected final Map<String, BundleMapLayer> protected static final LogChannel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.locationtech.jts.geom.EnvelopeCalculates the bounding box for all bundle operations across all aggregates.fetchGeoJSONData(String layerId, Function<List<HashGetter>, String> toGeoJSONFunction, org.locationtech.jts.geom.Envelope bbox, Map<String, Collection<String>> selectedFeatures) Fetches GeoJSON data for a specific layer.getGeoJSONInfo(String layerId, String featureId) Retrieves GeoJSON information for a specific feature in a layer.List<overit.geocall.basic.geos.ui.webmap.Layer> getGeoJSONLayers(boolean isVisible) Retrieves all GeoJSON layers.Retrieves a specific layer by its ID.booleanisLayerRegistered(String layerId) Checks if a layer with the specified ID is registered.voidregisterLayer(String layerId, BundleMapLayer layer) Registers a layer with a unique ID.voidregisterLayerTriad(String layerId, String layerName, List<BundleEntitiesAggregate> aggregates) Registers a triad of layers (bundle operations, bundle header, bundle starting position) for a specific set of BundleEntitiesAggregate using unique IDs and names based on bundle header.voidsetStartingPoint(BundleEntitiesAggregate aggregate, String coordinateData) Sets the starting point for a specific bundle aggregate.voidunregisterLayer(String layerId) Unregisters a layer with the specified ID.
-
Field Details
-
layers
-
LOG
-
BUNDLE_OPERATIONS_LAYER_ID
- See Also:
-
BUNDLE_OPERATIONS_LAYER_NAME
- See Also:
-
BUNDLE_LAYER_ID
- See Also:
-
BUNDLE_LAYER_NAME
- See Also:
-
BUNDLE_STARTING_POSITION_LAYER_ID
- See Also:
-
BUNDLE_STARTING_POSITION_LAYER_NAME
- See Also:
-
tooltipDefinitionBuilder
-
-
Constructor Details
-
BundleMapLayerManager
public BundleMapLayerManager()
-
-
Method Details
-
registerLayerTriad
public void registerLayerTriad(String layerId, String layerName, List<BundleEntitiesAggregate> aggregates) Registers a triad of layers (bundle operations, bundle header, bundle starting position) for a specific set of BundleEntitiesAggregate using unique IDs and names based on bundle header.- Parameters:
layerId- the layer ID suffixlayerName- the layer name suffixaggregates- the set of BundleEntitiesAggregate for which to register layers
-
registerLayer
Registers a layer with a unique ID.- Parameters:
layerId- the layer IDlayer- the layer to register
-
unregisterLayer
Unregisters a layer with the specified ID.- Parameters:
layerId- the layer ID
-
isLayerRegistered
Checks if a layer with the specified ID is registered.- Parameters:
layerId- the layer ID- Returns:
- true if the layer is registered, false otherwise
-
calculateMapEnvelope
public org.locationtech.jts.geom.Envelope calculateMapEnvelope()Calculates the bounding box for all bundle operations across all aggregates. Returns empty bounding box if no valid coordinates are found.- Returns:
- coordinate data for centering the map, or null if no coordinates available
-
fetchGeoJSONData
public String fetchGeoJSONData(String layerId, Function<List<HashGetter>, String> toGeoJSONFunction, org.locationtech.jts.geom.Envelope bbox, Map<String, Collection<String>> selectedFeatures) Fetches GeoJSON data for a specific layer.- Parameters:
layerId- the layer IDtoGeoJSONFunction- function to convert features to GeoJSON stringbbox- the bounding box for filtering featuresselectedFeatures- selected features- Returns:
- GeoJSON string for the specified layer
-
getGeoJSONInfo
Retrieves GeoJSON information for a specific feature in a layer.- Parameters:
layerId- the layer IDfeatureId- the feature ID- Returns:
- GeoJSON information for the specified feature, or empty if not found
-
getGeoJSONLayers
Retrieves all GeoJSON layers.- Returns:
- list of GeoJSON layers
-
setStartingPoint
public void setStartingPoint(BundleEntitiesAggregate aggregate, String coordinateData) throws DAException, DAValidateException, IOException Sets the starting point for a specific bundle aggregate.- Parameters:
aggregate- the bundle aggregatecoordinateData- the coordinate data- Throws:
DAException- if a database error occursDAValidateException- if the coordinate data is invalidIOException- if an I/O error occurs
-
getLayer
Retrieves a specific layer by its ID.- Parameters:
layerId- the layer ID- Returns:
- the layer, or null if not found
-