ZoomIn and zoomOut of RasterMap are used to zoom in and out the map.
Download the map development kit
Java ME platform map development kit
LWUIT platform map development kit
Blackberry platform map development kit
Android platform map development kit
IOS platform map development kit
Windows Phone platform map development kit
Desktop platform (Java SE,. Net Framework) map development kit
[Java]
Package com. pstreets. gisengine. demo. rim;
// ------------------------------------- IMPORTS ------------------------------------
Import com. mapdigit. gis. geometry. GeoLatLng;
Import com. mapdigit. gis. raster. MapType;
Import com. pstreets. gisengine. demo. MapDemoRIM;
Import net. rim. device. api. ui. component. Menu;
Import net. rim. device. api. ui. MenuItem;
// [-------------------------------- Main class ----------------------------------]
/**
* Map zoom demo for Guidebee Map API on MIDP platform.
* <Hr> <B>©Copyright 2011 Guidebee, Inc. All Rights Reserved. </B>
* @ Version 1.00, 09/02/11
* @ Author Guidebee Pty Ltd.
*/
Public class MapZoomRIM extends MapDemoRIM {
/**
* Entry point for application
* @ Param args Command line arguments (not used)
*/
Public static void main (String [] args)
{
// Create a new instance of the application and make the currently
// Running thread the application's event dispatch thread.
MapZoomRIM theApp = new MapZoomRIM ();
TheApp. enterEventDispatcher ();
}
Private MenuItem mapZoomInMenuItem = new MenuItem ("Zoom In", 0, 0 ){
Public void run (){
Map. zoomIn ();
}
};
Private MenuItem mapZoomOutMenuItem = new MenuItem ("Zoom Out", 1, 0 ){
Public void run (){
Map. zoomOut ();
}
};
Public MapZoomRIM (){
Init ();
PushScreen (canvas );
GeoLatLng center = new GeoLatLng (32.0616667, 118.7777778 );
Map. setCenter (center, 13, MapType. MICROSOFTCHINA );
}
Protected void createMenu (Menu menu, int instance ){
Menu. add (mapZoomInMenuItem );
Menu. add (mapZoomOutMenuItem );
}
}
Package com. pstreets. gisengine. demo. rim;
// ------------------------------------- IMPORTS ------------------------------------
Import com. mapdigit. gis. geometry. GeoLatLng;
Import com. mapdigit. gis. raster. MapType;
Import com. pstreets. gisengine. demo. MapDemoRIM;
Import net. rim. device. api. ui. component. Menu;
Import net. rim. device. api. ui. MenuItem;
// [-------------------------------- Main class ----------------------------------]
/**
* Map zoom demo for Guidebee Map API on MIDP platform.
* <Hr> <B>©Copyright 2011 Guidebee, Inc. All Rights Reserved. </B>
* @ Version 1.00, 09/02/11
* @ Author Guidebee Pty Ltd.
*/
Public class MapZoomRIM extends MapDemoRIM {
/**
* Entry point for application
* @ Param args Command line arguments (not used)
*/
Public static void main (String [] args)
{
// Create a new instance of the application and make the currently
// Running thread the application's event dispatch thread.
MapZoomRIM theApp = new MapZoomRIM ();
TheApp. enterEventDispatcher ();
}
Private MenuItem mapZoomInMenuItem = new MenuItem ("Zoom In", 0, 0 ){
Public void run (){
Map. zoomIn ();
}
};
Private MenuItem mapZoomOutMenuItem = new MenuItem ("Zoom Out", 1, 0 ){
Public void run (){
Map. zoomOut ();
}
};
Public MapZoomRIM (){
Init ();
PushScreen (canvas );
GeoLatLng center = new GeoLatLng (32.0616667, 118.7777778 );
Map. setCenter (center, 13, MapType. MICROSOFTCHINA );
}
Protected void createMenu (Menu menu, int instance ){
Menu. add (mapZoomInMenuItem );
Menu. add (mapZoomOutMenuItem );
}
}
Author: mapdigit