createRoadShieldIcon method
- RoadShieldIconProperties properties,
- MapScheme mapScheme,
- IconProviderAssetType assetType,
- int widthConstraintInPixels,
- int heightConstraintInPixels,
- IconProviderCallback callback,
Creates an image displaying a road shield according to the given parameters.
properties The properties which determine the kind of road shield to be created.
mapScheme The map scheme for which the road shield should be created.
assetType The asset type for which the road shield should be created.
widthConstraintInPixels The maximum width of the road shield in pixels.
The value is capped to a maximum of 4096 pixels. The image will be created as large as
possible within the width and height constraints while maintaining the aspect ratio.
If set to 0, the width will be calculated based on the heightConstraintInPixels to
preserve the aspect ratio.
heightConstraintInPixels The maximum height of the road shield in pixels.
The value is capped to a maximum of 4096 pixels. The image will be created as large as
possible within the width and height constraints while maintaining the aspect ratio.
If set to 0, the original image-asset's height will be used.
callback The callback which is used to return the created image along with a description of the icon based on the
type of road and/or place it is used, or an error code.
Note: This feature is in BETA state and thus there can be bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.
Implementation
void createRoadShieldIcon(
RoadShieldIconProperties properties,
MapScheme mapScheme,
IconProviderAssetType assetType,
int widthConstraintInPixels,
int heightConstraintInPixels,
IconProviderCallback callback) {
_createRoadShieldIcon(properties,
mapScheme,
assetType,
widthConstraintInPixels,
heightConstraintInPixels,
callback);
}