android - CameraUpdateFactory zoom to does not zoom map -
i have method zooms map user's specified zoom level not zoom using cameraupdatefactory.zoomto(9f);
however zoom correctly if this
cameraposition position = new cameraposition.builder().target(location).zoom(9).build(); map.animatecamera(cameraupdatefactory.newcameraposition(position));
but requires have location zoom to.
according docs looks access zoomto
method statically when nothing happens.
am using first method incorrectly?
the method cameraupdatefactory.zoomto
not directly alter map, instead returns cameraupdate
value . value have new zoom level set , other parameters target, bearing, etc retained are. value take effect, need apply cameraupdate
map using animatecamera(cameraupdate) or movecamera(cameraupdate)
Comments
Post a Comment