Mappls Annotation Plugin¶
The Mappls Annotation Plugin simplifies the way to set and adjust the visual properties of annotations on a Mappls map.
This Plugin is uses to plot Symbol (marker), Line, Fill(Polygon) and circle on a Map.
Add the dependency¶
Add below dependency in your app-level build.gradle
Kotlin (build.gradle.kts)¶
// When using the BoM, you don't specify versions in Mappls library dependencies
implementation("com.mappls.sdk:annotation-plugin")
//Or Add Dependency with Version
implementation("com.mappls.sdk:annotation-plugin:2.0.0")
Groovy (build.gradle)¶
// When using the BoM, you don't specify versions in Mappls library dependencies
implementation 'com.mappls.sdk:annotation-plugin'
//Or Add Dependency with Version
implementation("com.mappls.sdk:annotation-plugin:2.0.0")
Initialize the Annotation plugin¶
To initialise the plugin there are Four Manager classes:
1. SymbolManager
2. LineManager
3. FillManager
4. CircleManager
Initialize SymbolManager (Marker)¶
Java¶
symbolManager = new SymbolManager(mapView, mapplsMap, style); //For Marker
Kotlin¶
symbolManager = SymbolManager(mapView, mapplsMap, style); //For Marker
Initialize Linemanager (Polyline)¶
Java¶
lineManager = new LineManager(mapView, mapplsMap, style); // For Polyline
Kotlin¶
lineManager = LineManager(mapView, mapplsMap, style); // For Polyline
Initialise FillManager (Polygon)¶
Java¶
fillManager = new FillManager(mapView, mapplsMap, style); // For Polygon
Kotlin¶
fillManager = FillManager(mapView, mapplsMap, style); // For Polygon
Initialize CircleManager (Circle)¶
Java¶
circleManager = new CircleManager(mapView, mapplsMap, style); //For Cirle
Kotlin¶
circleManager = CircleManager(mapView, mapplsMap, style); //For Cirle
Add Annotations¶
Add a Marker (Symbol)¶
Use SymbolOptions
to add the marker:
Java¶
//Add Custom Image
style.addImage("map-marker-image", bitmap);
// Create a symbol at the specified location.
SymbolOptions symbolOptions = new SymbolOptions()
.position(latLng)
.icon("map-marker-image")
// Use the manager to draw the symbol.
symbol = symbolManager.create(symbolOptions);
Kotlin¶
//Add Custom Image
style.addImage("map-marker-image", bitmap);
// Create a symbol at the specified location.
val symbolOptions = SymbolOptions()
.position(latLng)
.icon("map-marker-image")
// Use the manager to draw the symbol.
symbol = symbolManager?.create(symbolOptions)
Add a Polyline (Line)¶
Use LineOptions
to add the Polyline
Java¶
// Use options to color it red.
LineOptions lineOptions = new LineOptions()
.points(polyline)
.lineColor("#D81B60")
.lineWidth(1.0f);
// Use the manager to draw the annotation.
lineManager.create(lineOptions);
Kotlin¶
// Use options to color it red.
val lineOptions = LineOptions()
.points(polyline)
.lineColor("#D81B60")
.lineWidth(1.0f)
// Use the manager to draw the annotation.
lineManager?.create(lineOptions)
Add a Polygon (Fill)¶
Use FillOptions
to add the Polygon
Java¶
// Use options to color it red.
FillOptions fillOptions = new FillOptions()
.points(polygon)
.fillColor("#D81B60");
// Use the manager to draw the annotation.
fillManager.create(fillOptions);
Kotlin¶
// Use options to color it red.
val fillOptions = FillOptions()
.points(polygon)
.fillColor("#D81B60")
fillManager?.create(fillOptions)
Add a Circle¶
Use CircleOptions
to add the Circle
Java¶
// Use options to color it red.
CirlceOptions circleOptions = new CircleOptions()
.position(centerPoint)
.radius(5.0f)
.circleColor("#D81B60");
// Use the manager to draw the annotation.
cirlceManager.create(circleOptions);
Kotlin¶
// Use options to color it red.
val circleOptions = CircleOptions()
.position(centerPoint)
.radius(5.0f)
.circleColor("#D81B60")
cirlceManager?.create(circleOptions)
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!
@ Copyright 2025 CE Info Systems Ltd. All Rights Reserved.
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report
Customer Care: +91-9999333223