mapbox - Specific range of map in android by using mapView -


how show mapbox map view in specific range in android need show asia pacific in mapview ,not display full world in mapview android?

you can manually set zoom level of map (radius radius of map in meter):

double radius = 500.0;  circle circle = map.addcircle(new circleoptions().center(latlng).radius(radius).strokecolor(color.red)); circle.setvisible(false); int zoomlevel = getzoomlevel(circle); map.animatecamera(cameraupdatefactory.newlatlngzoom(latlng, zoomlevel));  private int getzoomlevel(circle circle) {   int zoomlevel = 15;   if (circle != null) {     double radius = circle.getradius();     double scale = radius / 500;     zoomlevel = (int) (16 - math.log(scale) / math.log(2));   }   return zoomlevel; } 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -