android - Google Maps API Zoom to fit KmlLayer -
i using google maps api android. i'm trying make zoom on kmllayer added map can't figure out how.
https://developers.google.com/maps/documentation/android-api/utility/kml?hl=en
any idea ?
i found alternative problem. can't zoom map fit layer can zoom specific location.
this code read kmllayer , kmlpoint object. can zoom location:
for (kmlcontainer c : layer.getcontainers()) { (kmlplacemark p : c.getplacemarks()){ kmlgeometry g = p.getgeometry(); if(g.getgeometrytype().equals("point")) { latlng point = (latlng) g.getgeometryobject(); log.e("point", point.latitude+" "+point.longitude); } } }
i hope :-)