Bubble Display

Why do you want to click on the logo of the map to pop up the bubble? In order to display the location information of the map dot identification more clearly and in more detail, and some functions that need to be implemented after clicking the bubble. Implementation method: an identification point of the map dot is created to create an Annotation object, and the click event is responded to by the monitoring point, and the corresponding bubble display function is implemented in the click event.

  1. (For complete code, see OverlayActivity.java in the Demo project)
    // bubble
    Vector2D pivot = new Vector2D(0.5f, 0.0f); // Set the offset of the bubble at the point
    Annotation an = new Annotation(1, point, 1101, pivot); // Create a bubble with an offset of pivot at the point
    CalloutStyle calloutStyle = an.getCalloutStyle(); // Get the bubble style
    calloutStyle.leftIcon = 0; // The icon to the left of the bubble is empty
    calloutStyle.rightIcon = 0; // The icon to the right of the bubble is empty
    an.setCalloutStyle(calloutStyle); // Set the display style for the bubble
    an.setTitle("custom POI point"); // display the title content for the bubble setting
    mRenderer.addAnnotation(an); // Add bubbles to the map
    an.showCallout(true); // Set the bubble to display

Bubble display:

气泡展示效果
TOP