在我的Windows机器中,我已经用php 5.6扫过了。
现在我用php 7.2.9安装了xampp
但是 private void moveCameraToKml(KmlLayer kmlLayer) {
for(KmlContainer container : kmlLayer.getContainers()){
for(KmlContainer nestedContainer : container.getContainers()){
// if (container.hasContainers()) {
// nestedContainer.getContainers();
// }
for(KmlPlacemark placemark : nestedContainer.getPlacemarks()){
Log.i("MTAG", placemark.getStyleId());
//Iterable containers = kmlLayer.getContainers();
// KmlLineString lineString = (KmlLineString) placemark.getGeometry();
// KmlMultiGeometry fddf=(KmlMultiGeometry)placemark.getGeometry();
KmlPolygon polygon = (KmlPolygon) placemark.getGeometry();
//Create LatLngBounds of the outer coordinates of the polygon
LatLngBounds.Builder builder = new LatLngBounds.Builder();
for (LatLng latLng : polygon.getOuterBoundaryCoordinates()) {
builder.include(latLng);
}
//
// for (LatLng latLng : fddf.getGeometryObject()) {
// builder.include(latLng);
// }
int width = getResources().getDisplayMetrics().widthPixels;
int height = getResources().getDisplayMetrics().heightPixels;
getMap().moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), width, height, 1));
}
}
}
显示C:\xampp>php -v
。
我的httpd.xampp.conf文件具有以下内容:
PHP 5.6.25