+ Reply to Thread
Results 1 to 3 of 3

Thread: Mapview zoomin, zoomto not working

  1. #1
    User 123
    Join Date
    Dec 2011
    Posts
    4
    Points
    0
    Answers Provided
    0


    0

    Default Mapview zoomin, zoomto not working

    Code:
    map = (MapView)findViewById(R.id.map);
    		// Add dynamic layer to MapView
    		map.addLayer(new ArcGISDynamicMapServiceLayer("" +
    		"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));
    		//Retrieve the non-configuration instance data that was previously returned.
    		Object init = getLastNonConfigurationInstance();
    			if (init != null) {
    			map.restoreState((String) init);
    }
    
    map.zoomin();
    i'm new to this and trying to zoom in from current map resolution.

    map.zoomin and map.zoomto is not working for me.

  2. #2
    User 123
    Join Date
    Dec 2011
    Posts
    4
    Points
    0
    Answers Provided
    0


    0

    Default Re: Mapview zoomin, zoomto not working

    Problem solved.

    I need to do a OnStatusChangedListener to check the initialization status
    before calling the zoomin() method.

  3. #3
    Archana Agarwal
    Join Date
    Jul 2011
    Posts
    28
    Points
    5
    Answers Provided
    1


    0

    Default Re: Mapview zoomin, zoomto not working

    The solution you found is correct. To perform any operation on the map, its necessary to check if the map is initialized, especially if you are working in the OnCreate method.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts