Hi,
I have designed an application to collect the location of bamboo species. However, I want to ensure that users are at the appropriate scale before adding points. I wanted to check the scale before allowing the menu to select features to be created:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu items for use in the action bar
if (mMapView.getScale()<25) {
Toast.makeText(getApplicationContext(),
"Please zoom in to Add Bamboo Features",Toast.LENGTH_LONG).show();
}
else mMapView.getScale();
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.actions, menu);
mOptionsMenu = menu;
updateActionBar();
return super.onCreateOptionsMenu(menu);
}
Cheers.
Can you describe the actual problem you are experiencing here? Is the scale not being reported properly or is something else not working as expected?