AnsweredAssumed Answered

Add features at certain scales to Android App

Question asked by beatpedo on Aug 6, 2014
Latest reply on Aug 11, 2014 by WCrick-esristaff

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.

Outcomes