MapSceneLoadOptionsBuilder (API Reference)
Class MapSceneLoadOptionsBuilder
Builder for creating MapSceneLoadOptions instances.
This builder ensures that either a MapScheme or a configuration file is set, but not both.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes a reason for failing to build aMapSceneLoadOptions.static final classDescribes the reason for failing to build aMapSceneLoadOptions.static final classThrown when failing to build aMapSceneLoadOptions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theMapSceneLoadOptionsinstance.withConfigurationFile(String configurationFile) Sets the configuration file path to load.withDisabledFeatures(List<String> disabledFeatures) Sets the features to disable in the new configuration.withEnabledFeatures(Map<String, String> enabledFeatures) Sets the features to enable in the new configuration.withMapScheme(MapScheme mapScheme) Sets the map scheme to load.withOverridingMapStyle(Style overridingMapStyle) Sets the style to override what is defined in the scene configuration.withWatermarkStyle(WatermarkStyle watermarkStyle) Sets the watermark style.
-
Constructor Details
-
MapSceneLoadOptionsBuilder
public MapSceneLoadOptionsBuilder()Creates a new builder instance.
-
-
Method Details
-
withMapScheme
Sets the map scheme to load. Any configuration file set through
withConfigurationFile(java.lang.String)will be discarded.- Parameters:
mapScheme-Map scheme to load.
- Returns:
This class instance.
-
withConfigurationFile
Sets the configuration file path to load. Any map scheme set through
withMapScheme(com.here.sdk.mapview.MapScheme)will be discarded.- Parameters:
configurationFile-Configuration file path to load.
- Returns:
This class instance.
-
withEnabledFeatures
@NonNull public MapSceneLoadOptionsBuilder withEnabledFeatures(@NonNull Map<String, String> enabledFeatures) Sets the features to enable in the new configuration.
- Parameters:
enabledFeatures-Features to enable. Key = feature name, value = mode name.
- Returns:
This class instance.
-
withDisabledFeatures
@NonNull public MapSceneLoadOptionsBuilder withDisabledFeatures(@NonNull List<String> disabledFeatures) Sets the features to disable in the new configuration.
- Parameters:
disabledFeatures-Features to disable.
- Returns:
This class instance.
-
withWatermarkStyle
@NonNull public MapSceneLoadOptionsBuilder withWatermarkStyle(@NonNull WatermarkStyle watermarkStyle) Sets the watermark style.
- Parameters:
watermarkStyle-Watermark style to use.
- Returns:
This class instance.
-
withOverridingMapStyle
@NonNull public MapSceneLoadOptionsBuilder withOverridingMapStyle(@NonNull Style overridingMapStyle) Sets the style to override what is defined in the scene configuration.
- Parameters:
overridingMapStyle-Map style to override the scene configuration.
- Returns:
This class instance.
-
build
@NonNull public MapSceneLoadOptions build() throws MapSceneLoadOptionsBuilder.InstantiationExceptionBuilds the
MapSceneLoadOptionsinstance.- Returns:
A new MapSceneLoadOptions instance.
- Throws:
MapSceneLoadOptionsBuilder.InstantiationException-Indicates an instantiation issue.
-