Search in sources :

Example 1 with KmlMultiGeometry

use of com.google.maps.android.data.kml.KmlMultiGeometry in project android-maps-utils by googlemaps.

the class Renderer method addMultiGeometryToMap.

/**
     * Adds all the geometries within a KML MultiGeometry to the map. Supports recursive
     * MultiGeometry. Combines styling of the placemark with the coordinates of each geometry.
     *
     * @param multiGeometry contains array of geometries for the MultiGeometry
     * @param urlStyle         contains relevant styling properties for the MultiGeometry
     * @return array of Marker, Polyline and Polygon objects
     */
private ArrayList<Object> addMultiGeometryToMap(KmlPlacemark placemark, KmlMultiGeometry multiGeometry, KmlStyle urlStyle, KmlStyle inlineStyle, boolean isContainerVisible) {
    ArrayList<Object> mapObjects = new ArrayList<>();
    ArrayList<Geometry> kmlObjects = multiGeometry.getGeometryObject();
    for (Geometry kmlGeometry : kmlObjects) {
        mapObjects.add(addKmlPlacemarkToMap(placemark, kmlGeometry, urlStyle, inlineStyle, isContainerVisible));
    }
    return mapObjects;
}
Also used : KmlMultiGeometry(com.google.maps.android.data.kml.KmlMultiGeometry) ArrayList(java.util.ArrayList)

Aggregations

KmlMultiGeometry (com.google.maps.android.data.kml.KmlMultiGeometry)1 ArrayList (java.util.ArrayList)1