How to change the background map location and orientation

After defining the GIS Interface manager, to change the orientation of the background map, you can use the following method:

bgm.setOrientation(Orientation.Horizontal); 


You can use Orientation.Horizontal or Orientation.Vertical. This will change the orientation of the background map with respect to the screen/table. Setting orientation only takes effect if it is done before the background map is added to layout root canvas.

To specify the location coordinates shown on the background map, you can use the following method which takes as arguments the longitude and latitude coordinates of the extent/rectangle. The arguments are MinX, MinY (for the minimum map point) and MaxX, MaxY (for the maximum map point). Make sure that the map layers you add have some data in the specified co-ordinates.

// Ex: North America
bgm.setBackgroundMapLocation(-160.75, 10, -39.24, 60); 


Last edited Jul 11, 2011 at 9:58 PM by ealafselim, version 5

Comments

No comments yet.