@@ -110,6 +110,37 @@ public KmlLayer(GoogleMap map,
110110 this (map , context .getResources ().openRawResource (resourceId ), context , markerManager , polygonManager , polylineManager , groundOverlayManager , cache , null );
111111 }
112112
113+ /**
114+ * Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.
115+ *
116+ * Constructor may be called on a background thread, as I/O and parsing may be long-running.
117+ *
118+ * Use this constructor with shared object managers in order to handle multiple layers with
119+ * their own event handlers on the map.
120+ *
121+ * @param map GoogleMap object
122+ * @param stream InputStream containing KML or KMZ file
123+ * @param context The Context
124+ * @param markerManager marker manager to create marker collection from
125+ * @param polygonManager polygon manager to create polygon collection from
126+ * @param polylineManager polyline manager to create polyline collection from
127+ * @param groundOverlayManager ground overlay manager to create ground overlay collection from
128+ * @param cache cache to be used for fetched images
129+ * @throws XmlPullParserException if file cannot be parsed
130+ * @throws IOException if I/O error
131+ */
132+ public KmlLayer (GoogleMap map ,
133+ InputStream stream ,
134+ Context context ,
135+ MarkerManager markerManager ,
136+ PolygonManager polygonManager ,
137+ PolylineManager polylineManager ,
138+ GroundOverlayManager groundOverlayManager ,
139+ Renderer .ImagesCache cache )
140+ throws XmlPullParserException , IOException {
141+ this (map , stream , context , markerManager , polygonManager , polylineManager , groundOverlayManager , cache , null );
142+ }
143+
113144 /**
114145 * Creates a new KmlLayer object - addLayerToMap() must be called to trigger rendering onto a map.
115146 *
0 commit comments