I try to center my map in the center of 2 points and then adapt the zoom with a zoom spanning.
My problem came when i try to center the view in the middle: I use this soooo simple code:
- Code: Select all
double lat1 = gpGare.getLatitudeE6();
double lat2 = gptest.getLatitudeE6();
double lon1 = gpGare.getLongitudeE6();
double lon2 = gptest.getLongitudeE6();
GeoPoint gpMiddle= new GeoPoint((int)((lat1+lat2)/2),(int)((lon1+lon2)/2));
But the problem is that the zoom does not change! I become crazy! When i click on my button, the map center at the correct point but the zoom remain the same than before.
One other strange behaviour is then, when i want to change the zoom with the maps button, i go directly to zoom 16 that i asked before!!!! I sometimes make a step of 5 or 6 zoom level by clicking one time on the + or - button.
Please help me.