We want to show our vector tiles on google map, we already done with png tiles with google map SDK's tile provider but we need it with vector tiles GeoJson. I have found some solution like this :
here it has these codes :
public class GoogleMapsActivity extends FragmentActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu items for use in the action bar
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_main, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
final Context context = this;
return super.onOptionsItemSelected(item);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.DarkTheme);
if(SettingsActivity.mUnits){
setContentView(R.layout.google_maps_tracker_metric);
} else {
setContentView(R.layout.google_maps_tracker);
}
}
@Override
protected void onResume(){
super.onResume();
// Get both fragments shown on the same screen
FragmentManager fragmentManager = getFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
GoogleMapsTracker fragment;
fragment = GoogleMapsTracker.newInstance();
GoogleMapsOGLES fragmentOGL;
fragmentOGL = GoogleMapsOGLES.newInstance();
fragmentTransaction.add(R.id.map, fragment);
fragmentTransaction.add(R.id.gl, fragmentOGL);
fragmentTransaction.commit();
}
@Override
protected void onPause(){
super.onPause();
}
@Override
protected void onDestroy() {
super.onDestroy();
}
but this is not complete and has some layouts and classes that not provided. did anyone do this or can help me with it ?