Android Google Maps edit

Change Offset

By changing mappoint x and y values as you need you can change offset possition of google map,by default it will be in the center of the map view. Call below method where you want to change it! Better to use it inside your onLocationChanged like changeOffsetCenter(location.getLatitude(),location.getLongitude());

public void changeOffsetCenter(double latitude,double longitude) {
           Point mappoint = mGoogleMap.getProjection().toScreenLocation(new LatLng(latitude, longitude));
           mappoint.set(mappoint.x, mappoint.y-100); // change these values as you need , just hard coded a value if you want you can give it based on a ratio like using DisplayMetrics  as well

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents
23 Google Maps
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close